0
0
Tailwindmarkup~5 mins

Margin utilities in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the Tailwind CSS class m-4 do?
It adds a margin of 1rem (16px by default) on all four sides of an element.
Click to reveal answer
beginner
How do you apply margin only to the top side of an element in Tailwind CSS?
Use the class mt-{size}, for example mt-2 adds margin-top of 0.5rem.
Click to reveal answer
beginner
What is the difference between mx-3 and my-3 in Tailwind CSS?
mx-3 adds horizontal margin (left and right), while my-3 adds vertical margin (top and bottom).
Click to reveal answer
beginner
How can you remove margin from an element using Tailwind CSS?
Use m-0 to remove all margins or mt-0, mr-0, mb-0, ml-0 to remove margin from specific sides.
Click to reveal answer
intermediate
What does a negative margin class like <code>-m-2</code> do in Tailwind CSS?
It applies a negative margin of 0.5rem, pulling the element closer or overlapping adjacent elements.
Click to reveal answer
Which Tailwind class adds margin only to the left side of an element?
Aml-4
Bmr-4
Cmx-4
Dm-4
What does my-6 do in Tailwind CSS?
AAdds margin top and bottom of 1.5rem
BAdds margin left and right of 1.5rem
CAdds margin on all sides of 1.5rem
DRemoves margin top and bottom
How do you apply a negative margin on the right side in Tailwind CSS?
Anegative-mr-3
B-mr-3
Cm-r-3
Dmr--3
Which class removes all margin from an element?
Am-none
Bm-clear
Cm-remove
Dm-0
If you want to add margin only on the bottom side, which class should you use?
Amx-5
Bmt-5
Cmb-5
Dmy-5
Explain how to use Tailwind CSS margin utilities to add space around an element on specific sides.
Think about how you add margin in CSS but with Tailwind's short classes.
You got /4 concepts.
    Describe how negative margins work in Tailwind CSS and when you might use them.
    Negative margins are like moving the element outside its normal space.
    You got /4 concepts.