Challenge - 5 Problems
Bootstrap Layout Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediateWhy use layout patterns in Bootstrap?
Which of the following best explains why layout patterns are important in Bootstrap?
Attempts:
2 left
💡 Hint
Think about how repeating the same layout code helps developers.
✗ Incorrect
Layout patterns in Bootstrap offer ready-made structures that developers can reuse. This saves time and keeps the website consistent and responsive.
📝 Syntax
intermediateBootstrap grid classes for layout
What is the correct Bootstrap class to create a column that takes half the width on medium screens and above?
Attempts:
2 left
💡 Hint
Medium screens start at 768px width in Bootstrap.
✗ Incorrect
The class col-md-6 sets the column to take 6 out of 12 parts (half) on medium screens and larger.
❓ layout
advancedResponsive layout with Bootstrap grid
Given this HTML snippet, what will be the layout on a small screen (less than 576px wide)?
<div class="row">
<div class="col-sm-4">Box 1</div>
<div class="col-sm-8">Box 2</div>
</div>
Bootsrap
<div class="row"> <div class="col-sm-4">Box 1</div> <div class="col-sm-8">Box 2</div> </div>
Attempts:
2 left
💡 Hint
Bootstrap grid classes with 'sm' apply from 576px and up.
✗ Incorrect
On screens smaller than 576px, columns without explicit classes stack vertically and take full width.
❓ accessibility
advancedAccessibility in Bootstrap layouts
Which practice improves accessibility when using Bootstrap layout components?
Attempts:
2 left
💡 Hint
Think about screen readers and keyboard navigation.
✗ Incorrect
Semantic HTML elements help assistive technologies understand the page structure, improving accessibility.
❓ selector
expertCSS selector specificity in Bootstrap overrides
You want to override Bootstrap's
.btn-primary background color only for buttons inside a <nav> element. Which CSS selector has the highest specificity to do this?Attempts:
2 left
💡 Hint
Consider specificity and scope of selectors.
✗ Incorrect
The selector nav .btn-primary targets buttons inside nav with higher specificity than just .btn-primary. Using !important is not recommended.
