/* */ Click to Join Live Class with Shankar sir Call 9798158723

Headlings tags


What is Headlings tag ?

HTML includes Six headings elements. These headings are <h1>, <h2>, <h3>, <h4>, <h5> and <h6>. Heading elements are used to write headings in a webpage, whereas p tag is only for plain text. All Headings are bold and block level elements. Font size of all heading gradually decreases. For example h1 is twice of p, h2 is 1.5% of p tag, h3 is 1.17% of p tag and h4 and p tags are of same font size. h5 and h6 are smaller than p tag.

HTML Headings Example

Headline <h1>
Headline <h2>
Headline <h3>
Headline <h4>
Headline <h5>
Headline <h6>

Headings Code
<!DOCTYPE html> 
<html lang="en">
    <head>
            <meta charset="UTF-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>Document</title>
    </head>
    <body>
    </h1> Headlings Example </h1>
    </h2> Headlings Example </h2>
    </h3> Headlings Example </h3>
    </h4> Headlings Example </h4>
    </h5> Headlings Example </h5>
    </h6> Headlings Example </h6>
    </body>
</html>
                            
Output

Headline Example


Headline Example


Headline Example


Headline Example


Headline Example

Headline Example




HTML h1 tag <h1>

H1 tag or <h1> is the main heading of a webpage. Search engines like Google, yahoo, bing etc gives maximum priority to the h1 element. As per search engine parameters, h1 tag should be used only once in a webpage. Default Font size of h1 element is 2em.

Heading 1 Example
<!DOCTYPE html> 
<html lang="en">
    <head>
            <meta charset="UTF-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>Document</title>
    </head>
    <body>
    </h1> What is HTML ? </h1>
    </body>
</html>
                            
Output

What is HTML ?




HTML h2 tag <h2>

H2 tag or <h2> is the sub heading of h1 element. It is recommended to use headings in proper order for better search results.

Heading 2 Example
<!DOCTYPE html> 
<html lang="en">
    <head>
            <meta charset="UTF-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <meta name="viewport" content="width=device-width, initial-scale=1.0">
            <title>Document</title>
    </head>
    <body>
    </h2> Html stands for hyper text markup language. </h2>
    </body>
</html>
                            
Output

Html stands for hyper text markup language.