0
0
Tailwindmarkup~20 mins

Tailwind installation and setup - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Tailwind Setup Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the purpose of the tailwind.config.js file?
In a Tailwind CSS project, what does the tailwind.config.js file do?
AIt is the main CSS file where Tailwind styles are written manually.
BIt contains the HTML structure of the website using Tailwind classes.
CIt defines custom settings like colors, fonts, and screen sizes for Tailwind to use.
DIt installs Tailwind CSS packages automatically when the project starts.
Attempts:
2 left
💡 Hint
Think about where you tell Tailwind about your design choices.
📝 Syntax
intermediate
1: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?
Anpm get tailwindcss
Bnpm install tailwindcss.css
Cnpm add tailwindcss
Dnpm install tailwindcss postcss autoprefixer
Attempts:
2 left
💡 Hint
Tailwind needs PostCSS and Autoprefixer to work properly.
rendering
advanced
1:30remaining
What will be the visual result after running this Tailwind setup code?
Given this minimal Tailwind CSS setup in your CSS file:
@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?
AA blue button with white text, padding around text, and rounded corners.
BA plain button with default browser styles and no colors or padding.
CA button with blue text on white background and no padding.
DAn error message because Tailwind directives are missing.
Attempts:
2 left
💡 Hint
Tailwind utilities like bg-blue-500 add background color.
selector
advanced
1: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?
Acontent
Btheme
Cplugins
Dvariants
Attempts:
2 left
💡 Hint
This option lists your HTML, JS, and other files for Tailwind to scan.
accessibility
expert
2: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?
AAvoid using focus styles to keep the design clean.
BAdd <code>aria-label</code> if the button text is not descriptive.
CUse only color classes like <code>bg-red-500</code> to show importance.
DUse <code>hidden</code> class to hide the button visually but keep it clickable.
Attempts:
2 left
💡 Hint
Screen readers need clear labels to understand buttons.