wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Tailwind CSS Quiz

Total questions: 10

Worksheet time: 2mins

Name
Class
Date
1.

Which utility class in Tailwind CSS sets a full-width container with padding on the sides?

a)

container-fluid

b)

full-width

c)

container

d)

max-w-screen

2.

What does the md: prefix indicate in Tailwind CSS?

a)

It applies styles only in dark mode

b)

It applies styles at the medium (md) breakpoint

c)

It modifies margin and padding

d)

It stands for "mobile device"

3.

Which Tailwind class applies a flexbox layout with items centered horizontally and vertically?

a)

flex center

b)

flex justify-center items-center

c)

flexbox middle

d)

flex-align-center

4.

How do you apply a hover effect that changes text color to blue in Tailwind?

a)

hover:text-blue

b)

hover:color-blue

c)

hover:text-blue-500

d)

text-hover-blue

5.

Which Tailwind utility sets a shadow around an element?

a)

shadow-sm

b)

box-shadow

c)

drop-shadow

d)

glow

6.

What is the correct way to add custom colors in Tailwind CSS?

a)

Modify the colors.js file

b)

Extend the theme in tailwind.config.js

c)

Use inline CSS

d)

Import a separate CSS file

7.

Which Tailwind class makes an element take up the remaining space in a flex container?

a)

flex-grow

b)

flex-auto

c)

flex-expand

d)

flex-remaining

8.

What does the @apply directive do in Tailwind CSS?

a)

It imports external stylesheets

b)

It applies JavaScript functions

c)

It extracts reusable styles into CSS classes

d)

It enables animations

9.

Which utility sets a responsive grid with 3 equal-width columns?

a)

grid-3

b)

grid-cols-3

c)

grid-template-3

d)

cols-3

10.

How do you enable dark mode in Tailwind CSS?

a)

darkMode: 'class' in tailwind.config.js

b)

mode: 'dark'

c)

theme: 'dark'

d)

@dark media query