HTML Fundamentals Tutorial
About Lesson

<h1> to <h6>: Introduction to various heading elements and their hierarchical structure. Usage and semantic importance of headings for structuring content and improving accessibility.

  • Definition:
    Headings (<h1> to <h6>) are used to define headings of different levels on a web page. They represent hierarchical structure and provide semantic meaning to the content.

  • Element Type:
    Block-level

  • Why Use This:
    Headings provide structure and hierarchy to your content, making it easier for users to navigate and understand the organization of the page. They also contribute to search engine optimization (SEO) by indicating the importance of different sections of your content.

  • Available Resources:

    • Text content
    • Images (for decorative purposes)
  • Recommendation:
    Use headings to organize and structure your content hierarchically. <h1> should be used for main headings, followed by <h2> for subheadings, and so on. Avoid skipping heading levels and use them semantically.

  • Example:

<h1>This is a Heading Level 1</h1>
<h2>This is a Heading Level 2</h2>
<h3>This is a Heading Level 3</h3>
<h4>This is a Heading Level 4</h4>
<h5>This is a Heading Level 5</h5>
<h6>This is a Heading Level 6</h6>
  • Explanation:
    • Headings (<h1> to <h6>) are used to define headings of different levels on a web page.
    • <h1> represents the highest level of heading, while <h6> represents the lowest level.
    • Headings are important for structuring content and providing semantic meaning to the information on the page.
Join the conversation