Challenge - 5 Problems
Tailwind Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
What is the purpose of the
tailwind.config.js file?In a Tailwind CSS project, what does the
tailwind.config.js file do?Attempts:
2 left
💡 Hint
Think about where you tell Tailwind about your design choices.
✗ Incorrect
The
tailwind.config.js file lets you customize Tailwind's default design system, like adding new colors or breakpoints.📝 Syntax
intermediate1:00remaining
Which command correctly installs Tailwind CSS via npm?
You want to add Tailwind CSS to your project using npm. Which command should you run?
Attempts:
2 left
💡 Hint
Tailwind needs PostCSS and Autoprefixer to work properly.
✗ Incorrect
The correct command installs Tailwind CSS along with PostCSS and Autoprefixer, which Tailwind requires to process CSS.
❓ rendering
advanced1:30remaining
What will be the visual result after running this Tailwind setup code?
Given this minimal Tailwind CSS setup in your CSS file:
And this HTML:
What will you see in the browser?
@tailwind base; @tailwind components; @tailwind utilities;
And this HTML:
<button class="bg-blue-500 text-white p-4 rounded">Click Me</button>
What will you see in the browser?
Attempts:
2 left
💡 Hint
Tailwind utilities like
bg-blue-500 add background color.✗ Incorrect
The Tailwind directives import base styles, components, and utilities. The button classes apply a blue background, white text, padding, and rounded corners.
❓ selector
advanced1:15remaining
Which Tailwind config option controls which files are scanned for class names?
In
tailwind.config.js, which option tells Tailwind which files to look at to find CSS classes you use?Attempts:
2 left
💡 Hint
This option lists your HTML, JS, and other files for Tailwind to scan.
✗ Incorrect
The
content option is an array of file paths where Tailwind looks for class names to include in the final CSS.❓ accessibility
expert2:00remaining
How to ensure a Tailwind-styled button is accessible?
You have a button styled with Tailwind classes. Which practice improves its accessibility the most?
Attempts:
2 left
💡 Hint
Screen readers need clear labels to understand buttons.
✗ Incorrect
Adding
aria-label helps screen readers describe buttons when visible text is unclear or missing, improving accessibility.