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

CSS CSS Layout Techniques Display Modes Block vs. Inline Elements

Michael Leismeister
Michael Leismeister
3,706 Points

Is using div class=whatever a good practice for layout?

Been going through css class I am new but it seems like Guil is using old way of layout practices. Is using divs instead of sections how HTML5 should be used? I thought this practice is discouraged?. Any one know if this course is out dated?

1 Answer

Hi Michael,

HTML5 did not deprecate divs, nor are they discouraged - unless a semantic tag is available.

For example, use <nav> instead of <div class="nav">

The course is definitely not outdated. Divs are alive and well, especially when making your own custom containers.

<div class="box">

Hope this helps,

Cheers

So we should use <nav>? It looks like he did not do that in this example.