0
0
Bootsrapmarkup~20 mins

Visibility utilities in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Visibility Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Bootstrap's d-none class
What is the visual effect of applying the Bootstrap class d-none to an HTML element?
Bootsrap
<div class="d-none">Hidden Text</div>
AThe element is completely hidden and takes up no space on the page.
BThe element is visible but with reduced opacity.
CThe element is visible but disabled for user interaction.
DThe element is visible only on small screens.
Attempts:
2 left
💡 Hint
Think about whether the element still occupies space or not.
📝 Syntax
intermediate
1:30remaining
Using responsive visibility classes
Which Bootstrap class combination will make an element visible only on medium (≥768px) and larger screens, but hidden on smaller screens?
Bootsrap
<div class="???">Responsive Text</div>
Ad-block d-md-none
Bd-none d-md-block
Cd-md-none d-lg-block
Dd-none d-sm-block
Attempts:
2 left
💡 Hint
Remember that d-none hides the element and d-md-block shows it from medium screens up.
rendering
advanced
1:30remaining
Effect of invisible class on element layout
What will you see in the browser when the following HTML is rendered?
<button class="btn btn-primary invisible">Click Me</button>
Bootsrap
<button class="btn btn-primary invisible">Click Me</button>
AA visible button with reduced opacity.
BA button that is hidden and does not occupy any space.
CA button that is invisible but still occupies space and can be clicked.
DA disabled button that cannot be clicked.
Attempts:
2 left
💡 Hint
The invisible class uses visibility: hidden; CSS.
selector
advanced
1:30remaining
Selecting elements hidden only on large screens
Which Bootstrap class hides an element only on large (≥992px) screens but shows it on smaller screens?
Bootsrap
<div class="???">Content</div>
Ad-none d-xl-block
Bd-none d-lg-block
Cd-lg-block d-xl-none
Dd-lg-none
Attempts:
2 left
💡 Hint
Look for a class that applies display: none; starting at large screens.
accessibility
expert
2:00remaining
Accessibility impact of using d-none vs invisible
Which statement about accessibility is true when using Bootstrap's d-none and invisible classes?
A<code>d-none</code> hides content from screen readers, while <code>invisible</code> keeps content accessible but visually hidden.
B<code>invisible</code> hides content from screen readers, while <code>d-none</code> keeps content accessible but visually hidden.
CBoth <code>d-none</code> and <code>invisible</code> hide content from screen readers.
DNeither <code>d-none</code> nor <code>invisible</code> affect screen reader accessibility.
Attempts:
2 left
💡 Hint
Consider how CSS display and visibility affect screen reader behavior.