J.4. Headers

Some text in an XHTML document might be more important than other text. For example, the text in this section is considered more important than a footnote. XHTML provides six headers, called header elements, for specifying the relative importance of information. Figure J.2 demonstrates these elements (h1 through h6).

Figure J.2. Header elements h1 tHRough H6.

"http://www.w3.org/1999/xhtml"> 9 10

 1  "1.0"?>
 2  "-//W3C//DTD XHTML 1.1//EN"
 3 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
XHTML headers 11 12 13 14 15

Level 1 Header


Level 2 header


Level 3 header


Level 4 header


Level 5 header


Level 6 header

21 22 23

Header element h1 (line 15) is considered the most significant header and is rendered in a larger font than the other five headers (lines 1620). Each successive header element (i.e., H2, h3, etc.) is rendered in a smaller font.

Portability Tip J.1

The text size used to display each header element can vary significantly between browsers.


Look-and-Feel Observation J.1

Placing a header at the top of every XHTML page helps viewers understand the purpose of each page.


Look-and-Feel Observation J.2

Use larger headers to emphasize more important sections of a Web page.

C++ How to Program
C++ How to Program (5th Edition)
ISBN: 0131857576
EAN: 2147483647
Year: 2004
Pages: 627
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net