Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7915575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:29:59+00:00 2026-06-03T14:29:59+00:00

I come to you for help once again, Stack Overflow. This time I have

  • 0

I come to you for help once again, Stack Overflow. This time I have trouble understanding the semantics of HTML5 regarding a heading for the main contents of my site. Below are two examples, which one should I use? Perhaps I should go a completely different way?

Edit: I mixed up the code examples!

Example 1

Using this code I get an outline like:

  1. Category: foo
  2. Blog post #1
  3. Blog post #2

Which seems incorrect, since the blog posts are posted under the category?

<header id="header">
    <h1>My awesome website!</h1>
    <!-- Primary navigation and such -->
</header>
<div id="content">
    <section id="title">
        <h1>Category: foo</h1>
        <p>Some content</p>
    </section>
    <article>
        <h1>Blog post #1</h1>
        <p>Some content</p>
    </article>
    <article>
        <h1>Blog post #2</h1>
        <p>Some content</p>
    </article>
</div>

Example 2

Using this code I get an outline like:

  1. Category: foo
    1. Blog post #1
    2. Blog Post #2

Which seems correct to me, but HTML5 Doctor says that <section> should not be used as a main/primary content wrapper.

Also if I were to use this example, would I exchange <section id="content> with a <div id="content"> if there is no natural heading for the main content (like the index page where all posts are shown)?

<header id="header">
    <h1>My awesome website!</h1>
    <!-- Primary navigation and such -->
</header>
<section id="content">
    <header id="title">
        <h1>Category: foo</h1>
        <p>Some content</p>
    </header>
    <article>
        <h1>Blog post #1</h1>
        <p>Some content</p>
    </article>
    <article>
        <h1>Blog post #2</h1>
        <p>Some content</p>
    </article>
</section>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T14:30:03+00:00Added an answer on June 3, 2026 at 2:30 pm

    Try using h1-h6 tags the old fashioned way.

    <h1>My awesome website!</h1>
    
    <section> 
    
        <h2>Category: foo</h2>
        <p>Some content</p>
    
        <article>
            <h3>Blog post #1</h3>
            <p>Some content</p>
        </article>
    
       <article>
           <h3>Blog post #2</h3>
           <p>Some content</p>
       </article>
    </section>
    
    <section>  
        <h2>Category: bar</h2>
        <p>some content</p>
    
        <article>
            <h3>Blog post #3</h3>
            <p>Some content</p>
        </article>
    
        <article>
           <h3>Blog post #4</h3>
           <p>Some content</p>
        </article>
    </section>     
    

    This is similar to HTML5Doctor’s own example of a <section> containing <article>s.

    Technically, you could replace the <h2> and <h3> tags with <h1>, and that would be just as valid. Using h1-h6 has the advantage of maintaining backwards compatibility with older user agents (screen readers in particular).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

once again I have come across a frustrating error in IE 7 (works fine
I have downloaded several new plugins which come with a help file. None of
Once again, I need some help and I appreciate you all for being here
Hoping someone can help me with a slight hurdle I've come up against in
I've come across 2 confusing problems in SML and was hoping someone could help
I come across this problem when i am writing an event handler in SharePoint.
How come this doesn't work (operating on an empty select list <select id=requestTypes></select> $(function()
I need help understanding the best way to manipulate a JavaScript data structure (if
I have created an image slider. This slider appears on every page of my
UPDATE : Thank you all who tried to help. I appreciate your time. As

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.