Recall & Review
beginner
What does the Bootstrap class
m-3 do?It adds margin on all sides of an element with a size of 3 (which equals 1rem by default).
Click to reveal answer
beginner
How do you add padding only to the left side of an element in Bootstrap?
Use the class
ps-* where * is the size number (0 to 5). For example, ps-2 adds padding-left with size 2.Click to reveal answer
beginner
What is the difference between
m-0 and p-0 in Bootstrap?m-0 removes all margin from the element, while p-0 removes all padding.Click to reveal answer
intermediate
Explain what
mx-auto does in Bootstrap.It sets the left and right margins to auto, centering the element horizontally within its container.
Click to reveal answer
intermediate
How do you apply different spacing on different screen sizes using Bootstrap spacing utilities?
Use responsive classes like
m-sm-2 or p-lg-4 to apply margin or padding starting from the specified breakpoint (small, large, etc.).Click to reveal answer
Which Bootstrap class adds padding on all sides with size 4?
✗ Incorrect
p-4 adds padding on all sides. m-4 adds margin, px-4 adds padding left and right, py-4 adds padding top and bottom.What does the class
mt-0 do?✗ Incorrect
mt-0 removes the top margin by setting it to zero.How do you center a block element horizontally using Bootstrap spacing utilities?
✗ Incorrect
mx-auto sets left and right margins to auto, centering the element horizontally.Which class adds margin only on the bottom with size 3?
✗ Incorrect
mb-3 adds margin-bottom with size 3.How do you add padding-left size 2 only on medium and larger screens?
✗ Incorrect
Bootstrap uses
ps-md-2 for padding start (left) on medium and larger screens.Describe how Bootstrap spacing utilities help control margin and padding on elements.
Think about how you add space around or inside boxes in a webpage.
You got /4 concepts.
Explain how to center an element horizontally using Bootstrap spacing utilities.
Remember how auto margins can center blocks in CSS.
You got /3 concepts.