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 trialabhishek rajan
8,668 Pointsabout navigation element
is it necessary to put the navigation element .I mean, can we write code only using anchor element.
Ernests Millers
7,184 PointsErnests Millers
7,184 PointsWell, nav element works as grouping tool and it is also useful for a semantic code. You can apply CSS styles to the anchor element by selecting the nav otherwise, you would need to write class attribute to each of anchor element. The reason of the nav is that it also helps you read your code as you immediately see that it is used for navigation and it is important for Search Engine Optimisation and screen readers. The nav tag is NOT needed when there is single anchor tag, it is about your main site navigation.