Challenge - 5 Problems
Icon Integration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediateWhy use icons in web design?
Which of the following is the main reason to integrate icons in a website using Bootstrap?
Attempts:
2 left
💡 Hint
Think about how icons help users understand buttons or links quickly.
✗ Incorrect
Icons help users quickly identify actions or information visually, improving usability and navigation.
📝 Syntax
intermediateCorrect Bootstrap icon usage
Which option correctly adds a Bootstrap icon for a search magnifying glass?
Attempts:
2 left
💡 Hint
Bootstrap icons use the 'bi' class prefix.
✗ Incorrect
Bootstrap icons use the bi class prefix with the icon name, like bi-search.
❓ rendering
advancedVisual result of icon integration
What will you see in the browser after adding this code?
<i class="bi bi-alarm"></i>
Attempts:
2 left
💡 Hint
Bootstrap icons show a small symbol matching the class name.
✗ Incorrect
The bi bi-alarm class displays a small alarm clock icon from Bootstrap Icons.
❓ accessibility
advancedMaking icons accessible
Which option correctly adds accessibility to a Bootstrap icon used as a button?
Bootsrap
<button type="button">[icon here]</button>
Attempts:
2 left
💡 Hint
Screen readers need a clear label describing the button's purpose.
✗ Incorrect
Using aria-label on the button provides a clear description for screen readers.
❓ layout
expertResponsive icon alignment with Bootstrap
Given this code snippet, what is the correct Bootstrap class to align the icon to the right on large screens but center on small screens?
<div class="d-flex [class here]"> <i class="bi bi-star"></i> </div>
Attempts:
2 left
💡 Hint
Use responsive flexbox justify-content classes for horizontal alignment.
✗ Incorrect
justify-content-center centers content on small screens, and justify-content-lg-end aligns it right on large screens.
