0
0
Tailwindmarkup~20 mins

How Tailwind differs from Bootstrap - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Tailwind vs Bootstrap Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What is the main difference in styling approach between Tailwind and Bootstrap?
Both Tailwind and Bootstrap help style websites, but they do it differently. Which option best describes how Tailwind's approach differs from Bootstrap's?
ATailwind uses JavaScript to style elements, Bootstrap uses only CSS.
BTailwind provides utility classes for styling small parts, while Bootstrap offers pre-designed components with fixed styles.
CBootstrap requires writing CSS for every element, Tailwind automatically styles everything without classes.
DBootstrap is only for mobile apps, Tailwind is only for desktop websites.
Attempts:
2 left
💡 Hint
Think about whether you get ready-made buttons or small building blocks to style.
📝 Syntax
intermediate
1:30remaining
Which Tailwind class adds padding of 1rem on all sides?
You want to add padding of 1rem (16px) on all sides of a div using Tailwind. Which class should you use?
Ap-1rem
Bpadding-1rem
Cp-4
Dpad-16
Attempts:
2 left
💡 Hint
Tailwind uses numbers to represent spacing scale, not direct units.
layout
advanced
2:30remaining
How does Tailwind handle responsive design compared to Bootstrap?
You want to make a layout that changes on small, medium, and large screens. How does Tailwind's approach to responsive design differ from Bootstrap's?
ATailwind uses prefix classes like <code>sm:</code>, <code>md:</code>, <code>lg:</code> to apply styles at breakpoints; Bootstrap uses separate grid classes for each screen size.
BTailwind requires writing media queries manually; Bootstrap automatically adjusts layout without classes.
CBootstrap uses JavaScript to detect screen size; Tailwind uses CSS variables.
DTailwind only supports mobile-first design; Bootstrap only supports desktop-first.
Attempts:
2 left
💡 Hint
Think about how you add classes that only apply on certain screen widths.
accessibility
advanced
2:30remaining
Which statement about accessibility support in Tailwind vs Bootstrap is true?
Accessibility means making websites usable by everyone, including people using keyboards or screen readers. Which is true about how Tailwind and Bootstrap support accessibility?
ATailwind automatically adds ARIA labels to all elements; Bootstrap does not.
BBootstrap components are not accessible; Tailwind components are fully accessible out of the box.
CBoth Tailwind and Bootstrap disable keyboard navigation by default.
DBootstrap provides accessible components by default; Tailwind requires developers to add accessibility features manually.
Attempts:
2 left
💡 Hint
Think about whether accessibility is built into components or left to the developer.
selector
expert
2:00remaining
What is the rendered color of this Tailwind button?
Consider this HTML snippet styled with Tailwind:
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">Click Me</button>

What color will the button background be when the mouse is NOT hovering over it?
AA medium blue color (#3b82f6)
BA dark blue color (#1e40af)
CWhite
DTransparent
Attempts:
2 left
💡 Hint
Look at the class starting with bg- without the hover: prefix.