H1 is the highest level of headings followed by H2, H3, H4, H5 and H6. H1 is considered the most significant or important. The importance decreases as the heading number increases.
Heading should be used judiciously. Normally heading level 1 is used for for top level or main headings and heading level 2 and 3 for sub-headings.
Adding a heading in an HTML page is fairly straight forward, just place your heading text between the <h1> and </h1> tags. In the following text all levels of headings are shown.
The Result is as under:Level 1 Heading
Level 2 Heading
Level 3 Heading
Level 4 Heading
Level 5 Heading
Level 6 Heading
Heading alignment can be controlled by using the align attribute. The align attribute takes the values; left, right, center or justify.
<h2 align="left">Level 2 Heading Left aligned</h2>
Level 2 Heading Left aligned
<h2 align="center">Level 2 Heading Centered</h2>
Level 2 Heading Centered
<h2 align="right">Level 2 Heading Right aligned</h2>
Level 2 Heading Right aligned
<h2 align="justify">Level 2 Heading Justified.....Note that the heading will only justfy itself if it is more than a single line...</h2>
Level 2 Heading Justified.....Note that the heading will only justfy itself if it is more than a single line...
Next >>> Lesson No. 9: Paragraphs and Line Breaks