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 trialSandis Upmalis
2,073 Pointsnav element usage
why we dont use nav element also for h1,h2 elements? it is not an navigation? how its look from semantic viewpoint?
2 Answers
Craig Watson
27,930 PointsHi Sandis,
The nav element is used for the browser to recognize the area on your site of which people can use to navigate across it. This is essential and common practice on every well coded and semantic site.
The h1 tag will be recognized as the up most heading on the page.
These two elements serve quite different purposes when you consider them form a semantic point of view for those reasons above.
To think on them simply from a visitors point of view:
NAV - How do I get to the page I need to get to or back to the page I was just on.
H1 - What should I expect to find on this page.
The above is very brief really but I hope it helps in some way.
Craig
Ron Starski
1,997 PointsGreat answer Craig, but I think Sandis was asking about the logo area, which just happens to consist of h1, h2 tags. So the question is should we put the logo area, which always navigates to the home page, inside the nav tag?