Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Web Fall 25 - CSS Review

Total questions: 32

Worksheet time: 29mins

Name
Class
Date
1.
Where should the line that connects your CSS file go?”
a)

Inside the < body >

b)

Inside a < div > at the bottom

c)
It doesn’t matter
d)

Inside the < head > of the HTML

2.
Which line correctly starts a rule to style all paragraphs?
a)
.p { }
b)
#p { }
c)
p { }
d)
p( )
3.

Fill in the selector to color all H1 headings blue, using this pattern (type only the selector): (a)   { color: blue; }

4.

Write one full rule that sets paragraph text to #333333 and the page background to #f5f5f5

4 lines
5.
Which rule is punctuated correctly?
a)
.card { padding: 16px border: 2px solid #222 }
b)
.card { padding: 16px; border: 2px solid #222 }
c)
.card ( padding: 16px; border: 2px solid #222; )
d)
.card { padding 16px; border: 2px solid #222; }
6.
You want dark text on a light background for paragraphs. Which two properties should you change?
a)
font-weight and outline
b)
text-transform and border
c)
color and background-color
d)
line-height and margin
7.

Which selector targets every paragraph on the page?

a)

p

b)

.p

c)

#p

d)

<p>

8.

Which selector targets the only id in the code?

a)

.hero

b)

hero

c)

#hero

d)

div.hero

9.

Write a selector that targets any element with class tagline.

a)

tagline

b)

.tagline

c)

#tagline

d)

p tagline

10.

Which selector styles the <h2> inside the .card section only?

a)

.card h2

b)

h2.card

c)

.card > h2

d)

#card h2

11.

Style all paragraph text to #333333. Write one rule.

4 lines
12.

Make every element with id info use 18px text. Write one rule.

4 lines
13.

Which is a valid 6-digit hex color?

a)

#2d6cdf

b)

#blue

c)

2d6cdf

d)

#ZZ1

14.

Write the rule that makes the page background #f5f5f5.

4 lines
15.

Which rule sets paragraph text to dark gray?

a)

p { background-color: #333333; }

b)

p { text-color: #333333; }

c)

p { color: #333333; }

d)

p { font-color: #333333; }

16.

Set #hero to have a background of #eaf2ff and text #222222. Keep it in one line.

4 lines
17.

Which property adds space inside the border around content?

a)

margin

b)

padding

c)

border

d)

gap

18.

Which property adds space outside the border between boxes?

a)

margin

b)

padding

c)

border

d)

outline

19.

Write a rule to give .card a 2px solid border with color #2d6cdf.

4 lines
20.

Make .section elements have 16px in this area.

4 lines
21.

Your text touches the inside edge of the box. What should you increase?

a)

padding

b)

margin

c)

border

d)

font-weight

22.

If a box has width: 300px; padding: 20px; border: 4px solid, with default content-box, what is the total visual width?

a)

324px

b)

340px

c)

348px

d)

300px

23.

Set paragraphs to 16px with line-height: 1.6 (two properties in one rule).

4 lines
24.

Which sets links to blue #2d6cdf while leaving paragraphs dark gray?

a)

p { color: #2d6cdf; } a { color: #333333; }

b)

a, p { color: #2d6cdf; }

c)

a { color: #2d6cdf; } p { color: #333333; }

d)

a { background-color: #2d6cdf; } p { color: #333333; }

25.

To style all second heading elements, the selector you would use is: (a)  

26.

To style the element with the id joke1, the selector is: (a)  

27.

To style any element with the class about, the selector is: (a)  

28.

The CSS property that changes text color is: (a)  

29.

The CSS property that changes the page or box background color is: (a)  

30.

Write one rule that sets every <p> tag’s text to #333333

4 lines
31.

The card uses id="card". Write one rule that sets its background to #fff7e6.

4 lines
32.

Titles use the id title. Write one rule that sets the font size to 28px

4 lines