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 trialRyan Taylor
38,343 PointsLess div tags and more semantically meaningful HTML5 tags are better, right?
Will be DRY, subject is question.
4 Answers
Donnie Reese
17,211 PointsGenerally, yes.
With HTML elements, if you use an element such as section or main and the specific browser does not actively "support" it, it simply degrades to a block element like a div. ( I believe this is true, at least. ) It does not affect how css is applied to it. Search engines use semantic, meaningful elements to determine content quality, a little, I believe. It also helps with large websites being broken up in to more readable and parsable chunks, which is GREAT.
I hope that helps. I think all of that is correct. :)
jmwii1981
11,947 PointsIt's all about SEO. If you are in the business of making money, which most of us are, then SEO will make you or break you. Good SEO doesn't only mean good content, relevant and accurate tagging, and content structuring anymore, it also means the ENTIRE structure of your HTML document. Enter HTML 5 which now has a slew of elements geared towards semantics which is coming up in the Internet world. Semantic versioning, semantic document structure... ...'meaning' is BIG right now. It's also important to have a certified secure https connection, which helps SEO, as well as responsiveness. I suppose you could say the search engines are looking at it all.
Ariel Aronica
6,646 PointsQuite frankly, I'm not so sure. I believe if you are starting your own work from scratch, you can go about it using divs or the HTML tags- your choice. BUT. Most developers seem to use divs, and if you are working with other people you would likely end up doing whatever the mainstream is doing. It doesn't seem to have caught on yet that you can be more specific, and people are set in their ways using divs. I think it's good practice to know how to use both and be comfortable with both methods.
amiel seña
2,791 Pointsfor me I just use divs if I am going to do something meaningless like using it for design purposes