0
0
Bootsrapmarkup~10 mins

Visibility utilities in Bootsrap - Browser Rendering Trace

Choose your learning style9 modes available
Render Flow - Visibility utilities
[Load HTML] -> [Parse HTML elements] -> [Apply Bootstrap CSS classes] -> [Evaluate visibility utility classes] -> [Update element display or visibility] -> [Repaint visible elements]
The browser reads the HTML, applies Bootstrap's visibility utility classes which change CSS display or visibility properties, then repaints the page showing or hiding elements accordingly.
Render Steps - 4 Steps
Code Added:class="d-block"
Before
[ ]
(empty space, no visible box)
After
[Visible block]
[___________]
The div with d-block becomes a visible block-level element, so it appears as a rectangular box with text.
🔧 Browser Action:Creates box for element, triggers reflow and repaint
Code Sample
Four divs with Bootstrap visibility classes that show or hide them depending on screen size.
Bootsrap
<div class="d-block">Visible block</div>
<div class="d-none">Hidden block</div>
<div class="d-sm-none">Hidden on small screens</div>
<div class="d-md-block">Visible on medium+ screens</div>
Render Quiz - 3 Questions
Test your understanding
After applying step 2, what happens to the element with class 'd-none'?
AIt becomes a block element
BIt disappears and takes no space
CIt becomes invisible but still takes space
DIt is visible only on small screens
Common Confusions - 2 Topics
Why does my element still take space even though I used a visibility utility?
If you use classes like 'invisible' (not shown here), the element is hidden but still takes space. Only 'd-none' removes it from layout.
💡 Use 'd-none' to remove element and space; 'invisible' hides but keeps space.
Why does my element show on desktop but not on mobile even though I only added 'd-none'?
If you use responsive classes like 'd-sm-none', the element hides only on small screens but shows on larger ones. Check which breakpoint your class targets.
💡 Responsive visibility classes apply only at certain screen widths.
Property Reference
ClassEffectScreen SizeCSS Property ChangedVisual Result
d-noneHide elementAlldisplay: noneElement disappears, no space taken
d-blockShow element as blockAlldisplay: blockElement visible as block box
d-sm-noneHide elementSmall and belowdisplay: none (media query)Element hidden on small screens
d-md-blockShow element as blockMedium and abovedisplay: block (media query)Element visible on medium+ screens
Concept Snapshot
Bootstrap visibility utilities control element display. 'd-none' hides element completely (display:none). 'd-block' shows element as block (display:block). Responsive classes like 'd-sm-none' hide/show elements at breakpoints. Use these to control visibility across screen sizes.