0
0
Tailwindmarkup~5 mins

Height utilities in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the Tailwind CSS class h-8 do?
It sets the element's height to 2rem (32px by default). Tailwind uses a spacing scale where 8 equals 2rem.
Click to reveal answer
beginner
How do you make an element take the full height of its parent using Tailwind?
Use the class h-full. It sets the height to 100% of the parent element's height.
Click to reveal answer
intermediate
What is the difference between h-screen and h-full in Tailwind?
h-screen sets height to 100% of the viewport height (the visible browser window). h-full sets height to 100% of the parent element's height.
Click to reveal answer
intermediate
How can you set a custom height like 500px in Tailwind?
Use the arbitrary value syntax: h-[500px]. This sets the height exactly to 500 pixels.
Click to reveal answer
beginner
What Tailwind class sets the height to auto, letting content decide the height?
The class h-auto sets height to auto, so the element grows or shrinks based on its content.
Click to reveal answer
Which Tailwind class sets an element's height to 100% of the viewport height?
Ah-100
Bh-full
Ch-auto
Dh-screen
What does h-0 do in Tailwind?
ASets height to 100%
BSets height to 1rem
CSets height to 0 pixels
DSets height to auto
How do you set an element's height to 50% of its parent in Tailwind?
Ah-1/4
Bh-1/2
Ch-50
Dh-full
Which class sets height to 'auto' in Tailwind?
Ah-auto
Bh-full
Ch-screen
Dh-fit
How can you specify a height of exactly 300 pixels in Tailwind?
Ah-[300px]
Bh-300
Ch-3
Dh-auto
Explain how to use Tailwind height utilities to make an element fill the entire viewport height and also how to set a custom pixel height.
Think about viewport vs parent and how Tailwind uses brackets for custom sizes.
You got /3 concepts.
    Describe the difference between h-full and h-auto in Tailwind CSS and when you might use each.
    Consider fixed height vs content-driven height.
    You got /4 concepts.