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

Alina Ardea
Alina Ardea
10,019 Points

<nav> in html

Hello! Maybe my question is a little bit off topic here, but I was wondering why the html of this exercise doesn't have <nav> to designate the navitation section? I was following the web design track so far and previously it was suggested that including some meaningful semantics in HTML5 is a good practice. At this point I have a doubt: does the <nav> add any value to the code if we really can style everything with classes (plus it adds extra characters to the code)? Thanks!

1 Answer

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

HTML5 markup has been introduced for a while now. You will see more and more sites gradually switch over to include the better markup that adds semantic meaning. Therefore, for best practices, it is best to include the HTML5 tags such as nav. It makes your site more accessible, especially for screen readers. Therefore, adding the nav element to your code will greatly increase the value of your code!

You can even add classes to these tags, for example:

<nav class="main-nav">
</nav>
Alina Ardea
Alina Ardea
10,019 Points

Hi Jamie! Thanks a lot for the response! I thought so. That was just a bit confusing to watch a seemingly new video which doesn't use good semantics in the example code.