HTML in an Instant

HTML in an Instant

by Ruth Maran, Maran Graphics

Paperback

$12.57 $14.99 Save 16% Current price is $12.57, Original price is $14.99. You Save 16%.

Product Details

ISBN-13: 9780764536274
Publisher: Wiley, John & Sons, Incorporated
Publication date: 08/28/2001
Series: In an Instant Series
Pages: 264
Product dimensions: 6.94(w) x 8.96(h) x 0.63(d)

Read an Excerpt

HTML in an Instant


By Ruth Maran

John Wiley & Sons

ISBN: 0-7645-3627-3


Chapter One

CREATE FRAMES

You can create frames to divide a Web browser window into sections that will each display a different Web page. You can specify the height or width of each frame you create in pixels, as a percentage of the screen or as an asterisk (*). If you specify an asterisk, the size of the frame will depend on the size of the other frames.

* Frames are useful when you want to keep information, such as a table of contents, on the Web browser screen at all times.

1 In a text editor, set up a Web page that includes the HTML, HEAD and TITLE tags. Do not type any text for the Web page or include the BODY tags.

2 Type [FRAMESET directly below the [/HEAD] tag. Then press the Spacebar.

3 To create frames in rows type ROWS="a,b..."] replacing a,b and so on with the height for each row.

* To create frames in columns, type COLS="a,b..."] replacing a,b and so on with the width for each column.

4 To specify the information for one frame, type [FRAME NAME="?" replacing ? with a name for the frame. Then press the Spacebar.

5 To specify the Web page in your Web site you want to appear in the frames, type SRC="?"].

6 If the Web page is stored in the same folder, replace ? with the name of the page.

Note: If the Web page is stored in a subfolder, youmust also specify the name of the subfolder.

7 Repeat steps 4 to 6 for each frames you created

8 Type [/FRAMESET]

9 Display the Web page in a Web browser.

* The Web browser displays the frames.

* Scroll bars appear automatically when a frame is too small to display the contents of an entire Web page. Users can use the scroll bars to move through the Web page.

FRAME CONSIDERATIONS

Designing a frames-based Web site requires careful organization and planning. While frames are useful for effectively presenting your Web site in an easy-to-navigate format, there are several factors you should take into consideration before using frames. Consider the following advantages and disadvantages of frames to determine if frames are appropriate for your Web site.

ADVANTAGES OF USING FRAMES

Frames display multiple Web pages in one Web browser window. This allows you to display a variety of information on the screen at once. For example, you can display a table of contents for your Web site, copyright information and the current Web page on the screen at the same time. Using frames also allows you to keep information, such as your company logo or a disclaimer, on the screen at all times without having to add the information to every Web page in your Web site.

If your Web site is large and complex, frames offer many advantages that can help users better understand your Web site structure and navigate through your Web pages. For example, you may want to display a navigation bar that contains links to the Web pages in your Web site. This lets users see the structure of the Web site at all times and allows them to easily access information of interest.

DISADVANTAGES OF USING FRAMES

Since frames divide a Web browser window into sections, the viewing area for each Web page is reduced. Web pages designed to be displayed in an entire Web browser window may not fit well in frames. Although users can scroll through the information in a frame, they may become annoyed if they have to continually scroll to view important information.

It is difficult to predict how your frames will appear on a user's computer, since the resolution of a user's monitor determines the amount of information that appears in the frames. People using lower screen resolutions will not see as much information in each frame.

You should also keep in mind that not all Web browsers support frames. If you want to ensure that all users will be able to view your Web pages, you will need to design a non-frames version of your Web site.

PROVIDE ALTERNATIVE TEXT

You can provide text that you want to appear if a user's Web browser does not display frames. If you do not provide alternative text, users with Web browsers that do not display frames will see a blank screen. The text you provide can include information from your Web pages or a short explanation of why users cannot see the Web pages.

* Perform the following steps on the Web page that defines the structure of your frames.

1 Type [NOFRAMES] directly below the [/FRAMESET] tag.

2 Type the text you want to appear if a Web browser does not display frames.

3 Type [/NOFRAMES]

4 Type [BODY] directly above the text you typed in step 2.

5 Type [/BODY] directly below the text you typed in step 2.

Note: The [BODY] and [/BODY] tags are optional.

* If a user views your Web page in a Web browser that does not display frames, the information you specified will appear.

CREATE A LINK TO A FRAME

You can create a link on a Web page that users can select to display a Web page in another frame. Creating links to frames can help users move through your Web site. For example, creating navigation links that will open in a different frame lets you keep the navigation links on the screen while users browse through your Web pages.

* Perform the following steps on the Web page you want to display the link.

1 Type the text or add the image you want users to select to display a Web page in another frame.

2 To specify the Web page in your Web site you want to appear in another frame, type [A HREF="?" in front of the text or image. Then press the Spacebar.

3 If the Web page is stored in the same folder, replace ? with the name of the page.

Note: If the page is stored in a Subfolder, you must also specify the Name of the subfolder.

4 To specify the frame where you want the Web page to appear, type TARGET="?"] replacing ? with the name of the frame.

Note: You assigned names to your frames in step 4 on page 152.

* To open the Web page in a new Web browser window instead of another frame, replace ? with _blank.

5 Type [/A] after the text or image.

6 Display the Web page in a Web browser.

* The Web browser displays the link.

* A user can click the link to display the Web page in the frame you specified.

SET THE DEFAULT TARGET

You can set a default target to specify the frame where you want all the links on a Web page to open. Setting a default target saves time since you do not need to specify a frame for each link you create. If you do not specify a frame for links, each link will open in the frame that contains the link.

* Perform the following steps on the Web page that contains the links you want to open in a specific frame.

1 Position the cursor between the [HEAD] and [/HEAD] tags.

2 Type [BASE TARGET="?"] replacing ? with the name of the frame where you want all the links on the Web page to open.

Note: You assigned names to your frames in step 4 on page 152.

3 Display the Web page in a Web browser.

* A user can click a link to display the linked Web page in the frame you specified.

Note: If you want a link on a Web page to open in a different frame, you must specify a target when creating the link.

PREVENT USERS FROM RESIZING FRAMES

You can prevent users from resizing frames on your Web page. This is useful when you do not want the layout of your frames to change. If you do not prevent users from resizing a frame, users can drag the frame border to a new location to resize the frame.

1 Position the cursor in the [FRAME] tag for the frame you do not want users to resize.

2 Type NORESIZE.

* You can repeat steps 1 and 2 for each frame you do not want users to resize.

3 Display the Web page in a Web browser.

* The Web browser will not allow users to resize the frame you specified.

Note: When you prevent users from resizing a frame, they will not be able to use the borders of the frame to resize neighboring frames.

HIDE OR DISPLAY SCROLL BARS

You can hide or display scroll bars for a frame at all times. By default, a Web browser will display scroll bars only when a Web page contains too much information to fit in the frame. Hiding the scroll bars is useful for reducing clutter in a small frame, while displaying scroll bars may improve the layout of some frames.

HIDE SCROLL BARS

1 Type SCROLLING="NO" in the [FRAME] tag for the frame you want never to display scroll bars.

DISPLAY SCROLL BARS

2 Type SCROLLING="YES" in the [FRAME] tag for the frame you want always to display scroll bars.

3 Display the Web page in a Web browser.

* The Web browser hides or displays the scroll bars for the frame.

* When you hide the scroll bars for a frame, you should view the frame at a lower screen resolution to make sure users will not need the scroll bars to display the contents of the frame.

CHANGE FRAME MARGINS

You can change the margins of a frame to adjust the amount of space between the contents of the frame and the edges of the frame. By default, most Web browsers display frame margins of approximately 10 pixels. You can set a frame margin to 0 to have the contents of the frame appear directly beside the edges of the frame.

1 Position the cursor in the [FRAME] tag for the frame you want to change.

2 To change the left and right margins, type MARGINWIDTH=? replacing ? with the amount of space you want to use in pixels. Then press the Spacebar.

3 To change the top and bottom margins, type MARGINHEIGHT=? replacing ? with the amount of space you want to use in pixels.

4 Display the Web page in a Web browser.

* The Web browser displays the frame with the margins you specified.

CHANGE FRAME BORDERS

You can customize the borders between your frames by changing the color or thickness of the borders. You can also hide the borders between your frames to make the contents of the frames appear as one Web page. For example, you may want to remove the frame borders between images in separate frames to have the images appear as a single image.

CHANGE BORDER COLOR

1 To change the color of frame borders, type BORDERCOLOR="?" in the [FRAMESET] tag, replacing ? with the name or code for the color you want to use (example: red or #FF0000).

Note: For a list of colors you can use, see page 245.

2 Display the Web page in a Web browser.

* The Web browser displays the frame borders in the color you specified.

CHANGE BORDER THICKNESS

1 To change the thickness of frame borders, type BORDER="?" in the [FRAMESET] tag, replacing ? with the thickness you want to use in pixels.

* To hide the frame borders, replace ? with 0 in step 1.

Note: To completely remove the space between the contents of the frames when hiding frame borders, you can set the width and height of the margins for each frame to 0.

2 Display the Web page in a Web browser.

* The Web browser changes the thickness of the borders between your frames.

(Continues...)



Excerpted from HTML in an Instant by Ruth Maran Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Table of Contents

1. The Internet.
2. Introduction to Creating Web Pages.
3. Getting Started.
4. Change Appearance of Text.
5. Add Images.
6. Work With Images.
7. Create Links.
8. Create Tables.
9. Add Sounds and Videos.
10. Create Forms.
11. Create Frames.
12. Advanced Web Pages.
13. Set Up Style Sheets.
14. Using Style Sheets.
15. Publish Web Pages.
16. Summary of HTML Tags.
Summary of HTML Tags.

Customer Reviews

Most Helpful Customer Reviews

See All Customer Reviews