HTML Headings Example

Hello everyone and in this post i’m going to talk about html headings example.

So let’s go ahead and get started on how to add headings to your website with an example.

example: HTML Headings Example

Also Read – HTML Attributes

<!DOCTYPE html>
<html>
<head>
<title>Flower Brackets - code here</title>
<meta charset="UTF-8">    <!-- Meta data is all about the HTML document -->
</head>
<body>

<h1>Website Heading 1</h1>
<p>Lorem ipsum dolor sit amet.</p>
<hr>                <!-- This will add horizontal line -->

<h2>Website Heading 2</h2>
<p>Lorem ipsum dolor sit amet.</p>
<hr>

<h3>Website Heading 3</h3>
<p>Lorem ipsum dolor sit amet.</p>
<hr>

<h4>Website Heading 4</h4>
<p>Lorem ipsum dolor sit amet.</p>
<hr>

<h5>Website Heading 5</h5>
<p>Lorem ipsum dolor sit amet.</p>
<hr>

<h6>Website Heading 6</h6>
<p>Lorem ipsum dolor sit amet.</p>
<hr>

</body>
</html>

Output:

HTML Headings Example

As you can see the above example, html heading are added between opening and closing body tag. Next we can go ahead and write our first h1 tag or html element. Then we are going to write texts in the middle or element content. Here html element means the whole thing, that is, i mean the h1 opening and closing tag and also the content that is in the middle. When search engines come to our website it will look for that h1 tag, which is the most important heading on the website.

NOTE:

  • use h1 heading tag only once on any given page.
  • you shouldn’t have two h2 heading tags.
  • you shouldn’t have more than six header type tags.
  • you don’t have to use all 6 of the heading tags.

I think you understand the importance of having good heading tags. So, hopefully that makes sense to you and if it did share this post.

About the author

admin

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *