html - HTML5 nav tag content -
In Html5,
& lt; Nav> Contrasting documents appear to be related to documents related to tags.
Examples I've seen use:
& Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Neo & gt; But I am thinking that this is only because people are used to using Divas. I have seen examples that just do this < Pre> & lt; Nav> & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Neo & gt; The other way seems cleaner for me more meaningful is there any "official" right version? Whether instead of directly using the apple elements, still the code inside & lt; Ul & gt; Is there a good reason to use ?
Both examples are meaningful.
In the first example, the list of anchors is clearly an anonymous list. In the second example, the list of links is just a collection of anchor elements.
If you just want a one-dimensional collection of links, then I'll
& lt; NAV & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; A href = '#' & gt; Link & lt; / A & gt; & Lt; / Neo & gt; However, it allows explicit hierarchical menu (such as drop down or treelists) using the ul elements: < Code> & lt; NAV & gt; & Lt; Ul & gt; & Lt; Li & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; Link & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub links & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub links & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub links & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; Li & gt; Link & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; Link & lt; / A & gt; & Lt; Ul & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub links & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; Sub links & lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Neo & gt;
Comments
Post a Comment