0
0
Tailwindmarkup~5 mins

Font size and scaling in Tailwind - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What unit does Tailwind CSS use by default for font sizes?
Tailwind CSS uses rem units by default for font sizes. This means font sizes scale relative to the root font size, helping with accessibility and responsiveness.
Click to reveal answer
beginner
How do you apply a large font size in Tailwind CSS?
You add a class like <code>text-lg</code> or <code>text-xl</code> to your HTML element. For example, <code>&lt;p class="text-xl"&gt;Hello&lt;/p&gt;</code> makes the text larger.
Click to reveal answer
intermediate
What is the benefit of using rem units for font size scaling?

Using rem units means font sizes scale based on the user's browser settings. This helps users who need larger text for readability and keeps your design flexible.

Click to reveal answer
intermediate
How can you make font sizes responsive in Tailwind CSS?
Use responsive prefixes like sm:text-base, md:text-lg, lg:text-xl. This changes font size based on screen width, making text easier to read on all devices.
Click to reveal answer
beginner
What does the class text-2xl do in Tailwind CSS?
It sets the font size to a predefined larger size, usually around 1.5rem (24px). This makes text stand out more, like for headings or important content.
Click to reveal answer
Which Tailwind class sets the font size to extra large?
Atext-xl
Btext-sm
Ctext-base
Dtext-xs
What unit does Tailwind use for font sizes by default?
A%
Bem
Cpx
Drem
How do you make font size change on medium screens in Tailwind?
Amd:text-lg
Btext-md
Cmedium:text-lg
Dtext-md:md
Why is using rem units good for accessibility?
AThey fix font size to pixels
BThey make fonts bold
CThey scale with user settings
DThey only work on desktop
Which class makes text smaller in Tailwind?
Atext-lg
Btext-sm
Ctext-xl
Dtext-2xl
Explain how Tailwind CSS uses font size classes and why rem units help with scaling.
Think about how font size changes on different devices and user preferences.
You got /3 concepts.
    Describe how to make text size responsive in Tailwind CSS and why it matters.
    Consider how text looks on small vs large screens.
    You got /3 concepts.