|
|
| |
The <H1> - <H6> Heading Tags |
| Headings and Sub Headings for Your Document |
| The Purpose of Headings |
Headings automatically alter the text to predefined text formatting, some browsers will change the color and style of the text within the Header Tags. Most browsers will follow the attributes set in the <Body> tag and allow you some minor modifications like color.
The most common use for Headers is to use <H1> for the title on the page, and the remaining tag numbers for outline style formatting.
Since we cannot predict the default font characteristics on the visitor's browser we cannot predict the exact rendering of the Headings tags. We can guess if we assume the default character size is 12 pixels, <H1> will be largest, <H2> will be somewhat smaller, <H3> smaller still, <H4> is the default browser size, <H5> smaller than default size, and <H6> the smallest Heading size. |
| Examples of the Heading Tags |
This is <H1>, and requires a closing </H> tag. |
This is <H2> |
This is <H3>, here we add the "align" attribute, align="left" is the default. |
This is <H4>, align="center". |
This is <H5>, align="right". |
This is <H6>, the smallest Heading size. |
Notice the spacing around each block of text, the <H> tag places a box around the text and isolates it from other content on the page. The boxes around the H Tag examples are to show the spacing and placement of the text, The H Tag will not draw a visable box on your page. One characteristic not shown here affects the "Align" attribute, when you use more than one Heading tag and the align attribute, the align attribute controls the following Heading tag. If you used <H1 align="center"> in the first Heading, you will have to reset the next Heading tag to <H2 align="left">.
The Sample code.
This is how it should look in your Browser. |
|
|
|