+ 6

Is <nav> tag nessesary ? What is the use of it ? And what it dose to the webpage ?

i am totally baffled.. please help.

7th Mar 2018, 7:39 AM
NIGHT STAR
NIGHT STAR - avatar
4 Answers
+ 5
the nav tag is used for sectioning the page. like footer, article, header etc. if you think there was only the div tag in the past version(s) of html, you would have used the same div tag for each section of your code. this way you can give your sections a meaningful name, which will help alot for the readability of your code. and no, you don't "have to" put your navigation in the nav tag. you can put whatever you want in those tags, but it would just look strange if you'd put your article inside the aside tag and your footer inside the nav tag. looking at the big picture: search engines and search engine users might find this weird as well.
7th Mar 2018, 8:35 AM
storm
storm - avatar
+ 8
Nav tag is used for the navigation menu. No, NAV is not necessary. You can add your navigation bar in a div tag.It can just a navigation menu in a webpage nothing more. You should define some link in the list in it for its working.
7th Mar 2018, 7:43 AM
Akash Pal
Akash Pal - avatar
7th Mar 2018, 7:46 AM
Akash Pal
Akash Pal - avatar
+ 5
I like what Storm and Akash have said! It makes me think of files and folders. Before everything just got thrown into the same place (think files all over the desk top). Now you have different folders to place certain kinds of things into. Do you have to?.. No, but it sure helps to organize things!
9th Mar 2018, 4:19 AM
Derek
Derek - avatar