0
0
Tailwindmarkup~10 mins

Pairing light and dark colors in Tailwind - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set a light background color using Tailwind CSS.

Tailwind
<div class="bg-[1]-100 p-4">
  Light background color box
</div>
Drag options to blanks, or click blank then click option'
Agreen
Bred
Cblue
Dyellow
Attempts:
3 left
💡 Hint
Common Mistakes
Using a dark shade number like 900 for a light background.
Using a color name that is not in Tailwind's palette.
2fill in blank
medium

Complete the code to set a dark text color using Tailwind CSS.

Tailwind
<p class="text-[1]-900">
  Dark text color example
</p>
Drag options to blanks, or click blank then click option'
Apink
Bgray
Cpurple
Dorange
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a light color name for dark text.
Using a shade number like 100 which is light.
3fill in blank
hard

Fix the error in the Tailwind class to apply dark mode background color.

Tailwind
<div class="[1]:bg-gray-800 p-6">
  Dark mode background
</div>
Drag options to blanks, or click blank then click option'
Ahover
Blight
Cfocus
Ddark
Attempts:
3 left
💡 Hint
Common Mistakes
Using light: which is not a valid Tailwind prefix.
Confusing hover or focus states with dark mode.
4fill in blank
hard

Fill both blanks to create a button with light background and dark text that changes in dark mode.

Tailwind
<button class="bg-[1]-200 text-[2]-900 dark:bg-[1]-800 dark:text-[2]-100 p-3 rounded">
  Click me
</button>
Drag options to blanks, or click blank then click option'
Ablue
Bgreen
Cgray
Dred
Attempts:
3 left
💡 Hint
Common Mistakes
Using the same color for background and text causing poor contrast.
Choosing colors that do not have matching dark mode shades.
5fill in blank
hard

Fill all three blanks to create a card with light background, dark border, and text that adapts in dark mode.

Tailwind
<div class="bg-[1]-50 border-[2]-700 text-[3]-900 dark:bg-[1]-900 dark:border-[2]-300 dark:text-[3]-100 p-5 rounded-lg">
  Adaptive color card
</div>
Drag options to blanks, or click blank then click option'
Ayellow
Bgray
Cpurple
Dteal
Attempts:
3 left
💡 Hint
Common Mistakes
Using bright colors for border causing harsh contrast.
Not matching dark mode shades properly.