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
Ryan Shrestha
4,735 PointsIs 'div' element still effective on html5?
After html5 has released, there is many changes and improvements. But I'm still confused should I still use div elements or the latest html5 division method like, Nav, Header, Footer, Section, Articles, etc. Can anyone help me out is div elements gonna vanish soon or is it stll ok to use on modern websites. Thank you
2 Answers
Christopher Bate
4,736 PointsHi. Maybe this article will help?
http://blog.teamtreehouse.com/use-html5-sectioning-elements
The secret is that you could always use these tags previously. There is no real special thing about <header> for example. In-fact you could make your own like <mainsection></mainsection> if you wanted.
http://stackoverflow.com/questions/2802687/is-there-a-way-to-create-your-own-html-tag-in-html5
The reason they specifically name common ones is to create a set of standards that will help code be more readable and to offer certain readers more info about how to display pages.
You will probably notice this more at the end of your html, where instead of seeing
</div>
</div>
</div>
You can now see
</article>
</section>
</main>
Which helps when you can't remember if you closed off a div
Ryan Shrestha
4,735 PointsThank you I understand now