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
Nav
is semantically more correct and is preferred over Div
. As to some answers I have read, Div
is often regarded as the last option to use in any element but we often see the opposite.
MDN Definition Nav
The HTML
element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents. Common examples of navigation sections are menus, tables of contents, and indexes. Here's the MDN Page Link for Nav Element
As I searched some more on the internet for Navbar
, all I can get from that is Navbar
is specifically for Links and Button Elements. It is used inside Nav
, as we see it being used in bootstrap docs.