Quantcast
Viewing all articles
Browse latest Browse all 10

HTML Headings

Headings


Syntax

A heading element is built using an opening and closing h1, h2, h3, h4, h5 or h6 tag and the heading text as content of the tag.

1
2
3
4
5
6
<h1>Level 1 Heading</h1>
<h2>Level 2 Heading</h2>
<h3>Level 3 Heading</h3>
<h4>Level 4 Heading</h4>
<h5>Level 5 Heading</h5>
<h6>Level 6 Heading</h6>

With our current theme the above HTML code would produce the following result:

Output:

Level 1 Heading

Level 2 Heading

Level 3 Heading

Level 4 Heading

Level 5 Heading
Level 6 Heading

Usage

Use heading elements for what they are – /headings/. Do not use them to just style some text differently. That being said, use headings throughout your text. Start with a level one heading that acts as title for the whole text, continue with level two headings for major sections, and if your text is large level three, four, etc. headings for sub-sections.

Remember to use headings generously since most readers use them as visual cues to the document structure and the topic being discussed.

Finally, another reason to use meaningful headings is that search engines may use them to help them analyze the contents of the document.


Viewing all articles
Browse latest Browse all 10

Trending Articles