Recall & Review
beginner
What is the purpose of the <code>.navbar-brand</code> class in Bootstrap?The <code>.navbar-brand</code> class is used to style the main branding element of a navbar, usually a logo or site name, making it stand out and linking it to the homepage.Click to reveal answer
beginner
What does the navbar toggler button do in a Bootstrap navbar?
The navbar toggler button shows or hides the navigation links on smaller screens, making the navbar responsive and easy to use on mobile devices.
Click to reveal answer
beginner
Which Bootstrap class is used to create the hamburger icon for the navbar toggler?The <code>.navbar-toggler-icon</code> class creates the hamburger icon inside the toggler button.Click to reveal answer
intermediate
Why is the
aria-controls attribute important on the navbar toggler button?The
aria-controls attribute links the toggler button to the collapsible menu it controls, improving accessibility for screen readers.Click to reveal answer
intermediate
How does Bootstrap know which menu to show or hide when the toggler button is clicked?
Bootstrap uses the
data-bs-target attribute on the toggler button to identify the collapsible menu by its ID and toggle its visibility.Click to reveal answer
What class should you add to a link to make it the brand in a Bootstrap navbar?
✗ Incorrect
The
.navbar-brand class is specifically for the brand element in a Bootstrap navbar.Which attribute on the toggler button specifies the menu it controls?
✗ Incorrect
The
data-bs-target attribute points to the ID of the collapsible menu to toggle.What icon appears inside the navbar toggler button by default?
✗ Incorrect
Bootstrap uses the
.navbar-toggler-icon class to show a hamburger icon inside the toggler button.Why is the navbar toggler important for mobile users?
✗ Incorrect
The toggler helps show or hide the menu on small screens, making navigation easier on mobile devices.
Which attribute improves accessibility by linking the toggler to the menu it controls?
✗ Incorrect
The
aria-controls attribute connects the toggler button to the collapsible menu for screen readers.Explain how the navbar brand and toggler work together to create a responsive navigation bar in Bootstrap.
Think about how the brand stays visible and the menu adapts on mobile.
You got /4 concepts.
Describe the role of accessibility attributes in the Bootstrap navbar toggler.
Focus on how screen readers understand the toggler.
You got /4 concepts.