Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between nav vs div.navbar in Bootstrap

Some of Bootstrap's examples use div.navbar to hold the navigation bar, and other examples (e.g., in the Components documentation page) use nav.navbar. What is the difference between these two approaches? And are there guidelines for using one instead of the other?

like image 893
Marty C. Avatar asked Aug 15 '14 15:08

Marty C.


1 Answers

Both will output same design but using nav tag is more semantic in approach. It represents main navigation of your page. using nav tag helps search engine recognize which is your main navigation on the page. there might be other links too but your top menu is the main menu. Hope this helps

like image 54
Vivek Padhye Avatar answered Sep 28 '22 01:09

Vivek Padhye