Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is the main approach Tailwind CSS uses for styling?
Tailwind CSS uses utility-first classes, which means it provides small, single-purpose classes that you combine to build custom designs directly in your HTML.
Click to reveal answer
beginner
How does Bootstrap handle styling compared to Tailwind?
Bootstrap provides pre-designed components and styles out of the box, like buttons and navbars, which you use as building blocks for your site.
Click to reveal answer
intermediate
Which framework encourages more custom design flexibility: Tailwind or Bootstrap?
Tailwind encourages more custom design flexibility because you build styles by combining utility classes, while Bootstrap has a fixed design style that can be customized but is more opinionated.
Click to reveal answer
beginner
What is a benefit of using Tailwind's utility classes in HTML?
Using utility classes in HTML lets you see and control styles directly in your markup, making it easier to customize and avoid writing separate CSS files.
Click to reveal answer
beginner
How does Bootstrap help beginners compared to Tailwind?
Bootstrap helps beginners by providing ready-made components and consistent styles, so you can build a good-looking site quickly without designing from scratch.
Click to reveal answer
Which CSS framework uses utility-first classes for styling?
AFoundation
BTailwind CSS
CBootstrap
DMaterialize
✗ Incorrect
Tailwind CSS is known for its utility-first approach, providing small classes to build custom designs.
Bootstrap mainly provides:
APre-designed components and styles
BA CSS reset only
CNo CSS, only JavaScript
DUtility classes only
✗ Incorrect
Bootstrap offers pre-designed components like buttons and navbars to help build websites quickly.
Which framework is better if you want a quick, consistent design without much customization?
ANeither
BTailwind CSS
CBootstrap
DBoth equally
✗ Incorrect
Bootstrap provides ready-made styles and components, making it easier to get a consistent look fast.
Tailwind CSS styles are mainly applied by:
AUsing utility classes in HTML
BWriting custom CSS files
CUsing JavaScript plugins
DImporting pre-built themes
✗ Incorrect
Tailwind encourages styling directly in HTML using utility classes.
Which framework requires more design decisions from the developer?
ABootstrap
BNeither
CBoth the same
DTailwind CSS
✗ Incorrect
Tailwind gives you building blocks but you decide how to combine them, so it needs more design choices.
Explain how Tailwind CSS and Bootstrap differ in their approach to styling web pages.
Think about how each framework helps you build the look of a website.
You got /4 concepts.
Describe a situation where you might choose Bootstrap over Tailwind, and why.
Consider ease and speed of building a consistent design.
You got /4 concepts.
Practice
(1/5)
1. Which statement best describes the main difference between Tailwind and Bootstrap?
easy
A. Both Tailwind and Bootstrap only provide pre-built components.
B. Bootstrap uses utility classes, and Tailwind provides pre-built components.
C. Tailwind uses utility classes for styling, while Bootstrap offers pre-built components.
D. Tailwind and Bootstrap are identical in how they style elements.
Solution
Step 1: Understand Tailwind's approach
Tailwind focuses on utility classes that style elements directly in HTML.
Step 2: Understand Bootstrap's approach
Bootstrap provides ready-made UI components with combined styles for quick use.
Final Answer:
Tailwind uses utility classes for styling, while Bootstrap offers pre-built components. -> Option C
B. Tailwind does not have btn or btn-primary classes by default
C. Padding class p-4 is invalid in Tailwind
D. Class names must be separated by commas
Solution
Step 1: Check class names against Tailwind defaults
Tailwind uses utility classes like p-4, but btn and btn-primary are Bootstrap classes, not Tailwind.
Step 2: Validate other class usage
p-4 is valid padding in Tailwind; button tags can have classes; classes are space-separated.
Final Answer:
Tailwind does not have btn or btn-primary classes by default -> Option B
Quick Check:
btn classes = Bootstrap, not Tailwind [OK]
Hint: Tailwind uses utility classes, not btn-primary [OK]
Common Mistakes:
Assuming Bootstrap classes work in Tailwind
Thinking p-4 is invalid
Confusing class separators
5. You want a custom card component with a shadow, rounded corners, and padding using Tailwind. Which class combination is best to achieve this?
hard
A. "card shadow rounded p-6"
B. "container box p-6 shadow-md"
C. "btn btn-primary p-6 rounded"
D. "shadow-lg rounded-lg p-6 bg-white"
Solution
Step 1: Identify Tailwind utility classes for shadow, rounding, padding
shadow-lg adds a large shadow, rounded-lg adds rounded corners, p-6 adds padding, and bg-white sets background color.
Step 2: Check other options for correctness
"card shadow rounded p-6" uses card which is not Tailwind; "btn btn-primary p-6 rounded" uses Bootstrap classes; "container box p-6 shadow-md" uses container and box which are not for card styling.