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

HTML/CSS Courses Use A lot of Divs

I notice that your HTML/CSS courses still use a lot of div elements instead of taking advantage of more semantic elements such as section and article tags. Is there a reason for this?

Could you maybe point to a specific course that is using unnecessary/outdated html elements?

2 Answers

You'd be surprised but many people still don't use those elements, especially some of the more awesome ones like abbreviations and data lists. Either way, I think it is to prevent overload, as there is nothing really inherently wrong with using a div for a footer or sidebar instead of the new semantic elements.

One of the best examples of something I see a lot that isn't true anymore is that you can only use one H1 per page.

There might be a couple of reason why the how to make a website course uses divs and not HTML5 elements.

  1. It very well coupled be that the video was released prior to HTML5. HTML5 was released in October 28, 2014. So the video may have been made prior to that date.

  2. I would say from an educational viewpoint that the concept of what a div is, is very profound, and can be confusing, especially to people who have never seen markup before. I'm guessing they wanted to start with most basic terminology first rather than diving into sections and asides and other HTML5 markup.

I imagine its a combo of the two.