I’m currently moving a page from HTML4 to HTML5, and I have kind of an issue. There’s a bunch of lists with links inside the footer. Most of them link to information (faq etc.) about the site itself. So I think it’s OK to put those inside a nav element (see “Introducing HTML5” and the HTHML5 Doctor). But two lists contain links to external pages like Facebook. Now I could wrap those inside an aside, but this is a bit of an edge case:
“It is legitimate to wrap the links to other pages on the site with an aside inside the footer — but ask yourself whether the aside to instead be a sibling of the footer […] After all, the links to other pages are presumably tangentially related to the whole page rather than just the content of the footer.” (Introducing HTML5)
I could also just leave them inside the footer without wrapping them. Since all the lists of links in the footer are a “visual unit”, I wouldn’t wanna take the external links out of the footer altogether at the moment, even though that might be better in regards to semantics.
I was searching for HTML5 sites with a similar footer but couldn’t find any.
What do you guys think is the best approach?
Thanks
I would suggest simply using a
<footer>with links in it.If you want to wrap the links in a
<nav>, that’s acceptable, but I would advise against it. The<nav>element is intended to mark up “major” navigation blocks, and the fact that you’re putting the links in a footer suggests that they are not a major navigation block. (In a sense,<footer>and<nav>are almost contradictory.) The spec even talks specifically about this scenario:As for
<aside>, I would say it’s overkill if you’re only going to put a few links in it, especially since it sounds like, though external, they belong together with the other links. If it helps with styling, and the external links feel like kind of a self-contained unit, then sure—otherwise, don’t bother. I would say the<footer>element itself already carries enough aside-ish semantics.