Recall & Review
beginner
What is the Tailwind CSS utility class to change text color to red?Use
text-red-500 to set the text color to a medium red shade in Tailwind CSS.Click to reveal answer
beginner
How do you apply a light gray text color using Tailwind CSS?
Use
text-gray-300 to apply a light gray color to text.Click to reveal answer
intermediate
What does the class
text-transparent do in Tailwind CSS?It makes the text fully transparent, so the text is invisible but still takes up space.
Click to reveal answer
intermediate
How can you change text color on hover using Tailwind CSS?
Use the hover prefix like
hover:text-blue-600 to change text color when the mouse is over the element.Click to reveal answer
beginner
Why is it important to consider color contrast when using text color utilities?
Good color contrast ensures text is readable for everyone, including people with vision impairments, improving accessibility.
Click to reveal answer
Which Tailwind class sets the text color to green?
✗ Incorrect
text-green-500 sets the text color to green. bg- changes background, border- changes border color, and hover:text- applies color on hover.
What does
text-gray-700 do?✗ Incorrect
text-gray-700 applies a dark gray color to the text.
How do you make text color change only when hovered in Tailwind?
✗ Incorrect
Use hover:text-colorname where colorname is the color you want on hover.
Which class makes text invisible but still takes up space?
✗ Incorrect
text-transparent makes text invisible but keeps its space. invisible hides the whole element visually but keeps space. hidden removes element from layout.
Why should you avoid low contrast text colors?
✗ Incorrect
Low contrast text is hard to read, especially for people with vision difficulties, reducing accessibility.
Explain how to use Tailwind CSS to change text color and how to make it change on hover.
Think about how you add color classes and how hover states work in Tailwind.
You got /3 concepts.
Describe why color contrast is important when choosing text colors in web design.
Consider who might have trouble reading low contrast text.
You got /4 concepts.