The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's HTML Tag Reference

| Index | Previous Tag: <HEAD> | Next Tag: <HR> |


<Hn>

Specifies a heading (H1, H2, etc.)

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later
Notes:
  • Each heading tag begins a new line, and text that follows a heading end tag appears on the next line.
  • This tag requires the </Hn> end tag.
Attributes:
ALIGN = "Text"
The horizontal alignment of the heading.

Support:

HTML StandardInternet ExplorerNetscape Navigator
3.0 and later 1.0 and later 1.0 and later

Notes:

  • Possible values: LEFT, CENTER, RIGHT, JUSTIFY.
  • This attribute is deprecated.

CLASS = "Text"
The style sheet class used by the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • You can specify two or more classes; be sure to separate each class name with a space.

CLEAR = "Text"
Determines whether the heading appears after an image if text is currently being wrapped around that image.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported Not supported Not supported

Notes:

  • This attribute is not currently supported.
  • The <IMG> tag's LEFT and RIGHT attributes enable you to wrap text around an image. If you use those attributes and the current text appears alongside an image, use the CLEAR attribute when you want the heading to begin below the image. (That is, when the left or right margin is clear of the image.) Use one of the following three values for this attribute:
    • LEFT—The next line appears when the left margin is clear.
    • RIGHT—The next line appears when the right margin is clear.
    • ALL—The next line appears when both the left and right margins are clear.

ID = "Text"
An alphanumeric string that uniquely identifies the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • Although you can use letters and numbers for the ID, the first character must be a letter.

LANG = "Text"
The language used by the tag's attribute values and text content.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

STYLE = "Text"
The style or styles to use with the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • If you enter multiple style properties, separate each one with a semi-colon (;).

Example:
<H1>This is an H1 heading</H1>
<H2>This is an H2 heading</H2>
<H3>This is an H3 heading</H3>
<H4>This is an H4 heading</H4>
<H5>This is an H5 heading</H5>
<H6>This is an H6 heading</H6>
How It Looks:

This is an H1 heading

This is an H2 heading

This is an H3 heading

This is an H4 heading

This is an H5 heading
This is an H6 heading

| Index | Previous Tag: <HEAD> | Next Tag: <HR> |