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 Introduction to HTML and CSS (2016) Getting Familiar with HTML and CSS Welcome to HTML and CSS

Why are we using a div followed by a class name of main-nav?

I was just curious as to why we are using a div with the class name main-nav instead of using the nav element with a class of main-nav?

Thanks!

1 Answer

Hi Louis, great question. Actually both div and nav are fine to use here because they are semantic html, although it would be better to use nav. If you are doing or someday want to do the Front End Web Development Techdegree, the first project works with code similar to this and one of the steps is to change the div tags to nav tags.