Headings in HTML

October 2016


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


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

Attribute Value Visual Effect




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>

Related :

Encabezados en HTML
Encabezados en HTML
Titelebene in HTML
Titelebene in HTML
Niveaux de titres en HTML
Niveaux de titres en HTML
Livelli di titoli in HTML
Livelli di titoli in HTML
Níveis de títulos em HTML
Níveis de títulos em HTML
Kodowanie typu quoted-printable
Kodowanie typu quoted-printable
This document entitled « Headings in HTML » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.