![]() |
|
Introduction to Headings in HTML, Free online HTML Tutorial, Learn HTML online for free... |
| Lessons | HTML Headings |
|
|
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. <h1>Level
1 Heading</h1> The Result is as under: Level 1 HeadingLevel 2 HeadingLevel 3 HeadingLevel 4 HeadingLevel 5 HeadingLevel 6 HeadingHeading alignment: 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
|