Skip to main content
Crowdfunding
Python + AI for Geeks
Practice

h Tags

HTML h tags are used to display headings.

Heading tags indicate the structure of the document and the importance of the heading.

The <h1> tag represents the largest heading and is used for the main title of the webpage or the title of the top section.

The <h1> tag should be used only once per webpage, and using it multiple times on a single page is not recommended.

h1 Tag
<h1>Webpage Title</h1>

The <h2> tag represents a heading slightly smaller than <h1>.

It is used for section headings or smaller titles on the webpage.

h2 Tag
<h2>Section Title</h2>

In addition, there are <h3>, <h4>, <h5>, and <h6> tags, and as the number after h increases, the heading size decreases.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.