Home :: Learning HTML :: Block Level :: Headings
Headings are used to set off and introduce different sections of a document.
Headings go from the most important, H1, to the least important,
H6. You can think of them as parts of an outline of your page.
Here's an example:
<H1>Heading for Entire Document</H1>
|
<H2>First Main Section</H2>
| |
| <H3>Sub-Section 1.1</H3>
| |
| <H3>Sub-Section 1.2</H3>
|
<H2>Second Main Section</H2>
|
<H3>Sub-Section 2.1</H3>
| |
| <H4>Sub-Sub-Section 2.1.1</H4>
| |
| <H4>Sub-Sub-Section 2.1.2</H4>
|
<H3>Sub-Section 2.2</H3>
Here's the above example, using the actual HTML, so you can see the size of the headings.
Headings can take the attribute ALIGN, with values of LEFT, CENTER and RIGHT.
The default is LEFT. So, a Level 3 heading, centered on the page, would be defined
by:
<H3 ALIGN="CENTER">Chihuahuas</H3>
The result would be:
It is undesirable to use H5 and H6 for two reasons:
H5 and H6 are usually rendered smaller than
regular text, thereby taking away their importance and making them hard to read; andAlso, don't use Headings to emphasize regular, non-heading text. Some search engines use headings to judge the important, key parts of a document, and excessive headings may water that down. There are elements specifically meant to give emphasis to text, and in the overall picture of HTML, you make stronger documents when you use elements for what they were intended.
Next: Paragraphs
Home:: Learning HTML :: Block Level :: Headings
Home |
Policies |
HTML |
FAQ
Publishing |
Booklet |
Tools |
Links