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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With