< Html Tutorial

Html heading

← Previous Next →


Headings element describes the topic of the section it introduces. Heading information helps user, tools to understand contents of the document automatically.


HTML Headings

Headings are defined with the <h1> to <h6> tags.

<h1> defines the most important heading. <h6> defines the least important heading.

Example

<h1>This is a heading</h1>
<h3>This is a heading</h3>
<h4>This is a heading</h4>

Note: Browsers automatically add some empty space (a margin) before and after each heading.


Headings Are Important

  • Use HTML headings for headings only. Don't use headings to make text BIG or bold.
  • Search engines use your headings to index the structure and content of your web pages.
  • Users skim your pages by its headings. It is important to use headings to show the document structure.
  • h1 headings should be main headings, followed by h3 headings, then the less important h4, and so on.

HTML Horizontal Rules

The <hr> tag creates a horizontal line in an HTML page.

The hr element can be used to separate content:

Example

<p>This is a paragraph.</p><hr>
<p>This is a paragraph.</p><hr>
<p>This is a paragraph.</p>

 


← Previous Next →