Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Should I Div Container or Wrapper for Semantic Mark up 2020

I am trying to Relearn Web Dev again and I am going over the newer html 5 elements and noticed that there are lots of newer tags that helps with screen readers so my question is should I use a <div id="container></div> to contain the whole website or should I now use <wrapper></wrapper> for this propose

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

There is no wrapper element in HTML.

You might want to use something like

<main id="wrapper"></main>

To use a containing wrapper element in your code. That has a more semantic meaning that a general <div> element. But keep in mind that within reason there's no right or wrong way to define semantic markup, which is to say that the makeup of your HTML document depends on the needs of your project. 😊

Thank you for your reply I will use the <main id="wrapper"></main> as my main container from now on thank you for your help