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

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

By , About.com Guide

<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

About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >