HTML H1 to H6 Tags

Posted The: 14/05/2008 At: 20:16

Last Edited: 02/09/2008 At: 12:12

The h1 to h6 Elements are used for Headlines.

A Common Problem

A common problem beginners face, is how to remove that "extra" line, or space below headlines. This is done through the Margin and Padding Properties.

Atributtes

Standard atributes

Atributte:Value:Description:DTD:
AttrsOther AttributesCommon, I18n, EventSTF

Examples

Note. Generally its best to use h1 first, then h2, h3 ETC.

<h1>h1 - Headline1</h1>
<h2>h2 - Headline2</h2>
<h3>h3 - Headline3</h3>
<h4>h4 - Headline4</h4>
<h5>h5 - Headline5</h5>
<h6>h6 - Headline6</h6>

Heading CSS Style Example:

   <style type="text/css">
    h1, h2, h3, h4, h5, h6 {
     margin: 0;
     padding: 0;
    }
    h1 {
     font-size: 2em;
    }
    h2 {
     font-size: 1.5em;
    }
    h3 {
     font-size: 1em;
    }
    </style>

Beginners should check out the Reference entry An Introduction to CSS, to see how to use CSS. The Tutorial Entry: Paragraphs and Headings might also be of interest.

Comments: [0]

© Brugbart Webdesign