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><p class="text-xl">Hello</p></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?
✗ Incorrect
text-xl sets the font size to extra large. The others are smaller sizes.
What unit does Tailwind use for font sizes by default?
✗ Incorrect
Tailwind uses rem units by default for font sizes, which scale relative to the root font size.
How do you make font size change on medium screens in Tailwind?
✗ Incorrect
md:text-lg applies the text-lg font size on medium screens and larger.
Why is using
rem units good for accessibility?✗ Incorrect
rem units scale with the user's browser settings, helping users who need larger text.
Which class makes text smaller in Tailwind?
✗ Incorrect
text-sm makes the font size smaller than the base size.
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.