1. Home
  2. Computing & Technology
  3. Web Design / HTML

<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>

By Jennifer Kyrnin, About.com

<h1></h1> ... <h6></h6> Description:

The <h1></h1>, <h2></h2>, <h3></h3>, <h4></h4>, <h5></h5>, and <h6></h6> elements create logical headings within the document. <h1> is the most important heading, and <h6> is the least important.

<h1></h1> ... <h6></h6> Web Browser Support:

<h1></h1> ... <h6></h6> Attributes:

<h1></h1> ... <h6></h6> End Tag:

</h1> ... </h6> REQUIRED

<h1></h1> ... <h6></h6> Contents:

CDATA. Text for a heading. The following tags are valid within the <h1></h1> ... <h6></h6> tag:
a, abbr, acronym, address, applet, b, basefont, bdo, big, blockquote, br, button, center, cite, code, dfn, dir, div, dl, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, i, iframe, img, input, isindex, kbd, label, map, menu, noframes, noscript, object, ol, p, pre, q, s, samp, script, select, small, span, strike, strong, sub, sup, table, textarea, tt, u, ul, var

<h1></h1> ... <h6></h6> Valid Context:

The <h1></h1> ... <h6></h6> tag is valid within the following tags:
blockquote, body, button, center, dd, div, fieldset, form, iframe, li, noframes, noscript, object, td, th

<h1></h1> ... <h6></h6> Usage:

  • <h1>Level 1 heading</h1>
    <h2>Level 2 heading</h2>
    <h3>Level 3 heading</h3>
    <h4>Level 4 heading</h4>
    <h5>Level 5 heading</h5>
    <h6>Level 6 heading</h6>

<h1></h1> ... <h6></h6> Special Notes:

  • These are logical divisions in the content of your document, and are not meant to define the look and style of the contents.
  • It is good form to include the headings in numerical order through your documents.
  • Most browsers display heading tags with an automatic carriage return. You can change that with CSS

More <h1></h1> ... <h6></h6> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. About.com Web Design A to Z
  5. Books
  6. About Web Design Book
  7. AWD: Chapter 5
  8. The h1 .. h6 Elements - Headers - XHTML 1.0 HTML 4.0

©2008 About.com, a part of The New York Times Company.

All rights reserved.