Recent

HTML / HTML5 Tutorial Part 3: Headings

How to create Headings in HTML





In this tutorial we will cover how you can create Headings in Hyper Text Markup Language.
When ever you write something either on paper or in computer the headings play an important role in making it more user friendly and readable text. same is applicable for websites also. In websites we need some headings to highlight something or get user attentions on some specific words.
for this purpose HTML provides us 6 types of headings, by default these all size headings are of black color and block display which means each heading will cover the whole line of your document. the size of all 6 HTML headings is in descending order means Heading 1 is largest and Heading 6 is the smallest heading and all other follows the same sequence until or unless you don't change it.
tags used for headings are <h1> <h2> <h3> <h4> <h5> <h6>
below is the sample code to show you how to write headings in HTML, you can write as many headings as you want, just use these tags when ever you want any heading.



Sample Code


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

Output

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

No comments