Navigation Flashcards
1
Q
What is the purpose of the <nav>
element in HTML?
A
The <nav>
element is used to define a section of the page for navigation
, informing the browser of the navigation role with the landmark
attribute.
2
Q
What is the function of page breadcrumbs in web navigation?
A
Page breadcrumbs show the user’s location on the website, reflect the current document’s position in the URL hierarchy, and allow direct navigation to ancestor sections.
3
Q
What is the HTML structure for implementing breadcrumbs navigation?
A
<nav aria-label="breadcrumbs"> <ol role="list"> <li><a href="/">web.dev</a></li> <li><a href="/learn">Learn</a></li> <li><a href="/learn/html">HTML</a></li> </ol> </nav>