What Should (and Shouldn't) Go Inside a <nav> Tag?
2. The Art of the Navigation Inclusion
Okay, so you're convinced the <nav> tag is a good idea. Awesome! But now what? What exactly should you put inside it? Typically, you'll want to include your primary navigation links. This could be a list of links to your homepage, services page, about us page, contact page, and so on. Think of the core pages that are essential for users to navigate your site effectively. That's prime real estate for your <nav>.
On the flip side, what shouldn't you put in a <nav>? Well, avoid cluttering it with every single link on your site. A footer, for example, might contain a bunch of helpful but secondary links. Those don't necessarily need to be wrapped in a <nav>. The key is to focus on the primary navigation — the links that users will use most often to find their way around. Think of it as the main highway, not every single side street.
It's also important to remember that you can have multiple <nav> elements on a page, but you should only use the element when the collection of links are primary navigation for the page. For example, your main website navigation could be in one <nav>, while a table of contents for a long article could be in another. Just make sure each <nav> is clearly defined and serves a specific navigational purpose, and that all the <nav> tags are related to a navigation in a page not just randomly included in one element. Avoid overuse and be sensible!
Think of it this way: if a user needs that link to find their way around, it probably belongs in the <nav>. If it's just a helpful but not essential link, it can live somewhere else. Less is more, right? Keep it clean, keep it focused, and keep your users happy. It's all about giving your website visitor a pleasant and intuitive experience. No one likes getting lost on the internet!