• Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.

    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Heading tags


Staff Team
Code Plus
Company Plus
Hello Coders!

This thread is to help you understand, identify and create the header tags used in HTML (h1,h2.. etc). There are a total of 6 header tags that range from h1 (largest) to h6 (smallest). A heading tag requires an opening tag <h1> and a closing tag </h1> within content in between the. Some examples are below:

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

Header tags are also important for SEO because they allow crawlers to figure out content topics / titles easier. For example, an H1 title followed by a short paragraph and then 3 more paragraphs with their own specific H2 tags can help readers & search engines know that the 3 H2 sections are related to H1. Kind of like telling people that each H2 blurb is a main point of whatever the H1 / text is about.

They also help with screen readers that search for header tags for section titles when they display the minimal design page to the reader or even present text to speech page navigation for the visually impaired.
Nice info!

Also, if you are using <section> element on your page, it is advisable to use at least one heading element (h1-h6) as a child of the section. It is a good markup practice. A heading added directly inside section tag would identify the theme of the section.

New Threads

Latest posts

Buy us a coffee!

Top Bottom