• Tutorial List

HTML Headings

Last updated Jul 08, 2020
HTML Headings

What are the HTML headings?

The HTML headings are used to highlight the important topics of a web page or an article. And headings are very helpful for organizing the content of a web page.

📝 Organized content is very good for user experience, and it can help to rank on search engines. So you can understand the headings are another most important part of web pages or websites.


How to add HTML Headings?

HTML offers six levels of heading tags, by using these tags you can add HTML headings on the web page. And by default, browsers display the headings in larger and bolder than normal text.

  • HTML Heading Tags
    1. <h1>...</h1>
    2. <h2>...</h2>
    3. <h3>...</h3>
    4. <h4>...</h4>
    5. <h5>...</h5>
    6. <h6>...</h6>
<!DOCTYPE html>
<html>
	<body>

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

	</body>
</html>

📝 Web Browsers automatically add some space (margin) before and after a heading.


Important notes about the heading tags

  • The <h1> tag is the main heading tag and the other tags are the subheadings. This tag is used to highlight the main topic of a web page. Therefore each web page should have only one <h1> tag.
  • The heading tags priority is serialized by their heading number. The h1 tag has the high priority, then h2 > h3 > h4 > h5 > h6.
  • Don’t use the heading tags to make a text Big or Bold.

Ask Questions

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