HTML Headings
HTML headings are defined with the <h1>
to <h6>
tags.
<h1> Main heading to <h6> Lower heading.
Reason to use Headings
Properly structured headings enhance readability and user experience on websites, ensuring that information is organized and easy to navigate.
- Heading Impact on SEO: The well-organized headings help search engines to understand the content structure and indexing.
- Highlighting Important Topics: The use of heading tags properly keeps the content readable.
<!DOCTYPE html>
<html>
<body>
<h1>This is Heading 1 (H1 Tag)</h1>
<h2>This is Heading 2 (H2 Tag)</h2>
<h3>This is Heading 3 (H3 Tag)</h3>
<h4>This is Heading 4 (H4 Tag)</h4>
<h5>This is Heading 5 (H5 Tag)</h5>
<h6>This is Heading 6 (H6 Tag)</h6>
</body>
</html>
Hierarchical Structure of Heading Tags
The <h1> Tag − The top-level heading denotes the main topic or title of the entire page.
The <h2> Tag − Subheadings under <h1> represent major sections related to the main topic. They provide a more specific context to the content.
The <h3> to <h6> Tags − These tags are used for further subsections or nested content within <h2> headings. They offer a deeper level of hierarchy for organizing content within specific sections.