Free Web Development Online Tutorials, Learn to Code
Learn HTML Syntax, Webpage Designing using HTML, Heading tags in HTML Tutorial for Beginners

Heading tags in html example

Heading tags are Important for SEO

Heading tags are very important tag in HTML document; it helps to make the content organized and reader friendly, and the content inside heading tag tells search engine what are the important subject on that particular page, thus helps in SEO

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

<h1> means the most important heading.

<h6> defines the least important heading

Here are some example how you can define heading tags

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

Font Size in Heading tag

Each HTML heading has a default font size. But you can specify the font size for any heading with the style attribute using the CSS font-size property, in your css file you can setup the default size for each heading.

h1 {
   font-size:28px;
}

h2 
{
    font-size:26px;
}

h3 
{
    font-size:24px;
}

Now when you define a heading in your webpage, it will take the default size you have set in your css

Comment
Name
Email
Website
Subscribe