I\'m making a navigation menu, should I be using the element or
element for that?
If I use a nav
I\'ll
Don't get confuses with and
. They both can be used together for a navigation menu.
Nav
is an HTML5 tag. If you are creating something in HTML5 you can use as there is no restriction, but not all browser will render this correctly.
Ul
creates an unordered list. Unordered means the items in the list will not be in any particular order. You can nest an ul
element inside nav
to place your links.
Read more about the HTML tags and how they work here.
This will create a navigation bar you have to put some CSS styles to look it better.
The above both code will produce the same result. The only difference is that nav
tells the browser that this element is for navigation purpose s.