0
0
Bootsrapmarkup~20 mins

Breadcrumb component in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Breadcrumb Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
2:00remaining
What is the visual output of this Bootstrap breadcrumb code?
Look at the following Bootstrap breadcrumb HTML. What will you see rendered in the browser?
Bootsrap
<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#">Home</a></li>
    <li class="breadcrumb-item"><a href="#">Library</a></li>
    <li class="breadcrumb-item active" aria-current="page">Data</li>
  </ol>
</nav>
AA horizontal list with links: Home > Library > Data (Data is plain text, not a link)
BA vertical list with links: Home, Library, Data (all are links)
CA horizontal list with links: Home > Library > Data (all are links)
DA horizontal list with links: Home > Library (both links), Data (hidden)
Attempts:
2 left
💡 Hint
Remember that the last breadcrumb item is usually marked active and is not a link.
accessibility
intermediate
1:30remaining
Which attribute ensures the breadcrumb is accessible to screen readers?
In Bootstrap breadcrumb navigation, which attribute is essential for accessibility to describe the breadcrumb region?
Aaria-label="breadcrumb" on the <nav> element
Baria-current="page" on all <li> elements
Crole="navigation" on the <ol> element
Dtabindex="0" on the <nav> element
Attempts:
2 left
💡 Hint
Think about how screen readers identify the purpose of a navigation region.
📝 Syntax
advanced
2:00remaining
What error occurs with this breadcrumb code?
What error or problem will this Bootstrap breadcrumb code cause when rendered?
Bootsrap
<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="#">Home</a></li>
    <li class="breadcrumb-item active" aria-current="page">Library</li>
  </ol>
</nav>
AThe <nav> element is missing the required role attribute
BThe breadcrumb will render correctly with no errors
CThe aria-current attribute is invalid on the active item
DThe breadcrumb will render but the first <li> is not closed, causing invalid HTML
Attempts:
2 left
💡 Hint
Check if all tags are properly closed in the list.
layout
advanced
2:00remaining
How to make breadcrumb items wrap on small screens?
By default, Bootstrap breadcrumb items stay on one line. Which CSS approach makes breadcrumb items wrap nicely on small screens?
AAdd CSS: .breadcrumb { display: block; }
BAdd CSS: .breadcrumb { flex-wrap: wrap; }
CAdd CSS: .breadcrumb-item { white-space: nowrap; }
DAdd CSS: .breadcrumb-item { display: inline-block; }
Attempts:
2 left
💡 Hint
Bootstrap breadcrumb uses flexbox by default.
🧠 Conceptual
expert
1:30remaining
What is the purpose of aria-current="page" in breadcrumb?
Why do we add aria-current="page" to the last breadcrumb item in Bootstrap?
AIt disables the link on the last breadcrumb item
BIt makes the last breadcrumb item visually bold
CIt indicates to assistive technologies that this item represents the current page
DIt hides the last breadcrumb item from screen readers
Attempts:
2 left
💡 Hint
Think about how screen readers know which page is active.