0
0
Bootsrapmarkup~20 mins

Display utilities in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Display Utilities Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
rendering
intermediate
2:00remaining
What will be visible on the screen?
Given the following HTML snippet using Bootstrap display utilities, which text will be visible when viewed on a large screen (≥992px)?
Bootsrap
<div>
  <p class="d-none d-lg-block">Visible on large screens</p>
  <p class="d-block d-lg-none">Visible on small screens</p>
</div>
ABoth texts are visible.
BOnly 'Visible on small screens' is visible.
CNo text is visible.
DOnly 'Visible on large screens' is visible.
Attempts:
2 left
💡 Hint
Remember that 'd-lg-block' means display block on large screens and 'd-none' hides the element.
selector
intermediate
2:00remaining
Which class hides an element only on medium screens?
In Bootstrap, which display utility class hides an element only on medium screens (≥768px and <992px) but shows it on other screen sizes?
Ad-none d-md-block d-lg-none
Bd-md-none d-lg-block
Cd-md-none d-sm-block
Dd-none d-md-none d-lg-block
Attempts:
2 left
💡 Hint
Look for a class that hides on medium screens but shows on large screens.
🧠 Conceptual
advanced
2:00remaining
What is the effect of d-flex in Bootstrap?
What does applying the Bootstrap class d-flex do to an element?
AIt hides the element on all screen sizes.
BIt makes the element inline-block.
CIt sets the element's display property to flex, enabling flexbox layout.
DIt applies a fixed width and height to the element.
Attempts:
2 left
💡 Hint
Think about CSS display properties and flexbox.
layout
advanced
2:00remaining
How to make an element visible only on extra small screens?
Which combination of Bootstrap display utility classes makes an element visible only on extra small screens (<576px) and hidden on all larger screens?
Ad-block d-sm-none
Bd-none d-sm-block
Cd-block d-md-none
Dd-none d-xs-block
Attempts:
2 left
💡 Hint
Remember that d-sm-none hides on small screens and up.
accessibility
expert
2:00remaining
Which Bootstrap display utility class combination ensures an element is hidden visually but accessible to screen readers?
You want to hide an element from visual display but keep it accessible to screen readers for accessibility. Which Bootstrap class or combination achieves this?
Avisually-hidden
Bd-none
Cd-none d-sm-block
Dd-hidden
Attempts:
2 left
💡 Hint
Think about classes designed specifically for accessibility, not just display.