Headings in HTML

Headings

HTML can use six different levels of headings to define the hierarchical structure of paragraphs in a document:

TagVisual Effect
H1 Test
H2 Test
H3 Test
H4 Test
H5 Test
H6 Test

Attributes

The following attributes are placed within structure tags so that the HTML elements can be displayed in specific places:

Attribute Value Visual Effect
ALIGN LEFT

RIGHT

CENTER

JUSTIFY

Left-aligned text

Right-aligned text

centred text

Justified text

NOWRAP   Prevents the browser from creating a line break.
ID   Gives the tag an identification. This attribute is especially useful for programming with JavaScript
LANG   Specifies a different language
CLASS   Assigns a class to the contents (for style sheets)
CLEAR   Used when text is surrounding an image. It brings the text as far down on the page as needed in order to have a clear margin.

Here is an example header:

<H1 ALIGN=JUSTIFY> Justified text </H1>
Last update on Thursday October 16, 2008 02:43:14 PM by Jeff
This document entitled « Headings in HTML » from Kioskea.net (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.
Style tags
Paragraphs