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
Arshdeep Singh
Courses Plus Student 8,349 Points<nav> or <ul> for website navigation.
Hello,
I would like to which is a better option to use nav or ul element for website navigation. what are the pro & cons of using both the elements, which one would you recommend and what is considered a best practice.
Thanks
2 Answers
Wayne Priestley
19,579 PointsUse both…
<nav>
<ul>
<li><a href="#">foo</a></li>
<li><a href="#">foo</a></li>
<li><a href="#">foo</a></li>
<li><a href="#">foo</a></li>
<li><a href="#">foo</a></li>
</ul>
</nav>
Shelby Sarisky
6,536 PointsI would be careful on this one. IE 8 and below does not support the <nav> tag and there are still a lot of internet users on IE8 and earlier (unfortunately). Just a heads up.
Arshdeep Singh
Courses Plus Student 8,349 PointsGracias... :)
Arshdeep Singh
Courses Plus Student 8,349 PointsArshdeep Singh
Courses Plus Student 8,349 PointsThankyou Wayne
James Barnett
39,199 PointsJames Barnett
39,199 PointsDon't forget to use the html5shiv polyfill so you can style the
navin older versions of IE.Al Lu
UX Design Techdegree Student 15,892 PointsAl Lu
UX Design Techdegree Student 15,892 PointsGood to know. Any other general guidelines like this one for html 5 pages? Maybe some essential meta tags? Maybe a course on the topic can be useful.
James Barnett
39,199 PointsJames Barnett
39,199 PointsAlon Lubin - That's what the HTML5 and you blog series over at Tuts Plus is for.
Al Lu
UX Design Techdegree Student 15,892 PointsAl Lu
UX Design Techdegree Student 15,892 PointsThanks!