The title pretty much explains it.
Now that we have a dedicated tag,
Is this:
No, they are equivalent. Remember, HTML 5 is backwards compatible with HTML 4 lists, so you can feel free to use them in the same regard. The trade off is less code for the 2nd version.
If you are concerned about backwards compatibility with respect to browsers, make sure to include this shim to provide functionality of tags such as <nav>
and <article>
.
I'd keep the <ul><li>
tags, because the new tags (<nav>
, <section>
, <article>
and so on) are just more semantic versions of <div>
s.
For the same reason you wouldn't just have a load of links in a <div>
, they should also be structured inside a <nav>
tag.
At this point, I'd keep the <ul><li>
elements, reason being that not all browsers support HTML5 tags yet.
For example, I ran into an issue using the <header>
tag - Chrome and FF worked like a charm, but Opera borked.
Until all browsers support HTML completely, I'd stick them in, but rely on the old ones for backwards compatibility.
If we're talking "by the book", then no; you don't need to use lists to mark up your navigation. The only real advantage they offer is to provide a better degree of flexibility when styling.
It's up to you really. If you usually used an unordered list to markup your navigation menu, then I'd say continue to do so within the <nav> element. The point of the <nav> element is to identify the navigation of the site to a computer reader for example, so whether you use a list or simply links is immaterial.
For me, the unordered lists are extra markup that aren't really required. When I look at an HTML document, I want it to be as clean and easy to read as possible. It's already clear to the viewer that a list is being presented if proper indentation is used. Thus, adding the UL to these a tags is unnecessary and makes for reading the document more difficult.
Although you may gain some flexibility, I believe it's a better idea to not bloat the markup with unsemantic ul classes and to style the a elements in one fell swoop. And you have no excuse: use the :before and :after pseudo-selectors.
Edit: I have been made aware that some ARIA screen readers treat lists differently than simple anchor tags. If your website is geared towards disabled people, I might consider using the list-based approach.