Section F.5. Headers


F.5. Headers

Some text in an XHTML document may 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 F.4 demonstrates these elements (h1 through h6). Header element h1 (line 15) is considered the most significant header and is typically rendered in a larger font than the other five headers (lines 1620). Each successive header element (i.e., h2, h3, etc.) is typically rendered in a progressively smaller font.

Figure F.4. Header elements h1 through h6.

  1  <?xml version = "1.0"?>  2  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"  3     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">  4  5  <!-- Fig. F.4: header.html -->  6  <!-- XHTML headers         -->  7  8  <html xmlns = "http://www.w3.org/1999/xhtml">  9     <head> 10        <title>Internet and WWW How to Program - Headers</title> 11     </head> 12 13     <body> 14 15        <h1>Level 1 Header </h1> 16        <h2>Level 2 header </h2> 17        <h3>Level 3 header </h3> 18        <h4>Level 4 header </h4> 19        <h5>Level 5 header </h5> 20        <h6>Level 6 header </h6> 21 22     </body> 23  </html> 

Portability Tip F.1

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


Look-and-Feel Observation F.1

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


Look-and-Feel Observation F.2

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




Visual BasicR 2005 for Programmers. DeitelR Developer Series
Visual Basic 2005 for Programmers (2nd Edition)
ISBN: 013225140X
EAN: 2147483647
Year: 2004
Pages: 435

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