HTML5: Should I use h2 or h3 for the content inside the element aside?

I fidgeted on the Internet, but I can not find a definitive answer to this. Given the following HTML5 structure below, should I use h2 or h3 inside my element aside for content headers?

I know that it’s good to use multiple h1s if they are inside a section and / or article element. But I'm not sure what to do aside? I think I should stay away from a few h1 aside, but I'm not sure about h2 and h3's.

Thanks!

<!DOCTYPE html> <html> <head> <title>Heading Tags</title> </head> <body> <section> <header> <h1>Main Section</h1> </header> <article> <h1>Article Title 1</h1> <div>Some Content Here</div> </article> <article> <h1>Article Title 2</h1> <div>Some Content Here</div> </article> <article> <h1>Article Title 3</h1> <div>Some Content Here</div> </article> </section> <aside> <header> <h1>Side Bar Heading</h1> </header> <div> <h2>Side Content Title 1</h2> <div>Some Content Here</div> </div> <div> <h2>Side Content Title 2</h2> <div>Some Content Here</div> </div> <div> <h2>Side Content Title 3</h2> <div>Some Content Here</div> </div> </aside> </body> </html> 
+4
source share
1 answer

You really shouldn't use multiple <h1> per page. The h tags are mainly used to determine the structure of a document. The Web Content Accessibility Standard (WCAG) 2.0 shows examples of how the h1 tag should head the page. Most states (such as Illinois) have their own outlines for accessibility standards. Illinois' in specific contours that there should be only one h1 tag on the page, and its contents will look like a <title> . Although this may be, and probably will, it is argued, it makes semantic sense to use only one h1 tag and allows the other 5 layers to correctly insert them.

Indeed, common sense plays a big role in structuring your other h tags. Imagine looking at your site in outline mode when you're done. Does it make sense?

For example, say that you want your site layout to look like this:

 Page Title Content - Article - Sub-article - Article Sidebar - Weather - Local News 

Whereas your header tags should work:

 <header> <h1>My News Website</h1> <nav></nav> </header> <section> <article> <h2>Article Title</h2> <p>Blah Blah Blah.</p> <h3>Sub-heading in Article</h3> <p>More blah blah blah.</p> </article> <article> <h2>Article Title</h2> <p>Blah Blah Blah.</p> </article> </section> <aside> <h2>Weather</h2> <p>Weather information.</p> <h2>Local News</h2> <ul> <li>News Item</li> <li>News Item</li> </ul> </aside> 

As long as the things you want on the same level have the same course number, then you are on the right track. Things that relate to the heading, which contextually makes sense to be β€œunder” the specified heading, should increase the course number by one.

Finally, you can chart your completed site shown to you using the HTLM 5 scheme. Check here: http://gsnedders.html5.org/outliner/

+3
source

All Articles