HTML and CSS Reference
With the insertion
point on line 11,
enter the HTML code
shown in Table 3-2,
pressing e n t e r at
the end of each line.
Make sure to indent
the t a b
the start and end
<header> tags from
the <img> tag, high-
lighting the image
insertion. Press the
e n t e r key twice at the end of line 13 to position the insertion point on line 15 (Figure 3-11).
code to add
start and end
on line 15
Why should I include the width, height, and alt attributes?
Adding width and height attributes can improve page loading time because the browser does not have to figure the
width and height before loading the image. Avoid using the height and width attributes to resize an image when possible.
Use graphic editing software to resize it and save it with a different filename. The height and width attributes as used in
the img tag should reflect the actual image size. The alt attribute provides information about the purpose of the image
for assistive technology such as screen readers.
Identify how to format text elements of the home page.
You should always make a plan before inserting the text elements of a Web page. By
formatting the characters and paragraphs on a Web page, you can improve its overall
appearance. Effectively formatting the text also makes the message or purpose of the Web
page clearer to the users. On a Web page, consider the following formatting suggestions.
Use default text size when appropriate
. The body text consists of all text between the
heading and the bottom of the Web page. This text is the main content of the Web
page and should be used to highlight the key points of your message. You can vary
your content by utilizing both paragraphs of text and lists.
Determine what text formatting to use
• . In a long Web page, it may help to vary
your text as a way to break information up between headings. Using bold, color, or
italicized text sparingly gives the Web page a more interesting look. Make sure not
to overdo the formatting of text because you can make the page look cluttered. It is
more difficult to find the content for which you are searching in a cluttered Web page.
Determine what style sheets to use
• . Consider using style sheets to vary the format
of text elements. If the text varies across paragraphs, an inline style is good to use.
If you want all of the text in the Web page to be the same, an embedded style sheet is
appropriate. If the text is common across more than one Web page, an external style
sheet (discussed in the next chapter) should be used.
Determine other information suitable for the home page
• . Other information that is
suitable for a home page includes: the company address (often found in the logo),
a phone number, and an e-mail link.