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 How to Make a Website Creating HTML Content Use the Navigation Element

Is <nav> necessary?

I don't really get what navs are for, are they just for aesthetics? What could happen if I don't use them?

1 Answer

Kevin Korte
Kevin Korte
28,148 Points

They are part of the html5 semantics. Nav elements just help browers and web crawlers better understand what a block of code is. It can also aid in people with disabilities who use screen readers, for the same purpose. They'll know they are in a navigation element.

From a presentational standpoint on a webpage, it makes little to no difference between a nav and an unordered list styled as a nav. It's just one is more semantic than the other.

What does semantic stand for? I'm not familiar with that word

Kevin Korte
Kevin Korte
28,148 Points

You'll hear the word semantic a lot of web development. As you advance, you'll be looking for ways to write more semantic code. Have more semantic class names, etc.

Semantic means meaning, or meaningful. So a nav element is more meaningful, than an unordered list when it's dealing with navigational elements.

It's more correctly relaying what the meaning of that chunk of code is, or does.