This is just a quickie. I've seen people use uls inside nav tags, but I've also seen others that don't. Everytime I try to make one, merely deciding whether I need the <ul>s inside my <nav> drives me crazy. Is there a standard for this or is it just a matter of personal preference?
Are <ul>s Inside HTML5 <nav>s legit?
Page 1 of 16 Replies - 532 Views - Last Post: 23 February 2013 - 06:10 AM
Replies To: Are <ul>s Inside HTML5 <nav>s legit?
#2
Re: Are <ul>s Inside HTML5 <nav>s legit?
Posted 19 February 2013 - 11:40 PM
that’s a matter of the navigation used. often the navigation is based on lists, hence <ul> (e.g. the Suckerfish Dropdown)
#3
Re: Are <ul>s Inside HTML5 <nav>s legit?
Posted 20 February 2013 - 01:08 AM
Well, yes, they are indeed based on lists. But the <a>s on the <nav> are already, well, within the <nav>. Isn't that enough to mean, 'hey, this part is the navigation menu and these are the links'? I mean, you wouldn't put <article>s in a <section> inside a <ul>.
Okay, did I just confuse everybody with what I said? lol
Okay, did I just confuse everybody with what I said? lol
#4
Re: Are <ul>s Inside HTML5 <nav>s legit?
Posted 20 February 2013 - 02:40 AM
#5
Re: Are <ul>s Inside HTML5 <nav>s legit?
Posted 20 February 2013 - 04:40 AM
Hmmm... Good point there... Thanks!
#6
Re: Are <ul>s Inside HTML5 <nav>s legit?
Posted 20 February 2013 - 02:17 PM
I feel like the OP is just confused on the use of <nav>.
Nav in html5 is just like any other element. You can style it with css like you would anything else.
.. is the same thing as
The real differences and reasons for using nav instead of a div, is really for structure and the use of screen readers. You can use nav more than once in a page, but you should really keep it limited to only major navigation groups. Breadcrumbs, menu's, etc.
If this is not what you were confused about then just ignore me.
Nav in html5 is just like any other element. You can style it with css like you would anything else.
<nav> <ul> <li></li> </ul> </nav>
.. is the same thing as
<div id="nav">
<ul>
<li></li>
</ul>
</div>
The real differences and reasons for using nav instead of a div, is really for structure and the use of screen readers. You can use nav more than once in a page, but you should really keep it limited to only major navigation groups. Breadcrumbs, menu's, etc.
If this is not what you were confused about then just ignore me.
#7
Re: Are <ul>s Inside HTML5 <nav>s legit?
Posted 23 February 2013 - 06:10 AM
I think the OP should also know that the basic rule in HTML/CSS is that you can put inline elements inside all other elements, block elements inside block elements, but not block elements inside inline elements. <nav> and <ul> are both block elements, so there is no problem there.
For more information, see the tutorial How to Position in CSS.
For more information, see the tutorial How to Position in CSS.
This post has been edited by FrankC: 23 February 2013 - 06:11 AM
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote





|