I've been wondering about this for the past few days and thought I should register on this website since most of the answers I'm looking for come from here. I wasn't able to find this answer, however.
I'm just wondering if it's semantically correct to nest the nav tag in an aside tag? I'm brand new to the HTML5 scene from XHTML.
<aside>
<nav id="locations">
An Arizona City Here
An Arizona Mountain Range
An Arizona Destination Here
Somewhere Arizona
Tucson Location
Bisbee Location Etc...
</nav>
</aside>
Yes as long as it is an aside to the content of the elements around it.
Since NAV elements themselves are defined as Flow content, that means that NAV elements can contain NAV elements.
The <nav> tag is used inside the <header> tag . This may happen if <nav> is very small and if the content of <nav> tag is used to identify the different web content. In such cases, the <nav> is usually taken inside of the <header> tag.
The links in the nav element may point to other webpages or to different sections of the same webpage. It is a semantic element. Common examples of the nav elements are menus, tables, contents, and indexes.
Yes as long as it is an aside to the content of the elements around it. If you are using it as "this is on the side of my main content in a column type area" then no, it is not appropriate. The semantics of the element is for content that is related to the main content, but not a part of it. You can read more on the w3c site that has "translated" the spec for web developers. It explains some example uses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With