WorksheetsWeb Fall 25 - CSS Review
Total questions: 32
Worksheet time: 29mins
Inside the < body >
Inside a < div > at the bottom
Inside the < head > of the HTML
Fill in the selector to color all H1 headings blue, using this pattern (type only the selector): (a) { color: blue; }
Write one full rule that sets paragraph text to #333333 and the page background to #f5f5f5
Which selector targets every paragraph on the page?
p
.p
#p
<p>
Which selector targets the only id in the code?
.hero
hero
#hero
div.hero
Write a selector that targets any element with class tagline.
tagline
.tagline
#tagline
p tagline
Which selector styles the <h2> inside the .card section only?
.card h2
h2.card
.card > h2
#card h2
Style all paragraph text to #333333. Write one rule.
Make every element with id info use 18px text. Write one rule.
Which is a valid 6-digit hex color?
#2d6cdf
#blue
2d6cdf
#ZZ1
Write the rule that makes the page background #f5f5f5.
Which rule sets paragraph text to dark gray?
p { background-color: #333333; }
p { text-color: #333333; }
p { color: #333333; }
p { font-color: #333333; }
Set #hero to have a background of #eaf2ff and text #222222. Keep it in one line.
Which property adds space inside the border around content?
margin
padding
border
gap
Which property adds space outside the border between boxes?
margin
padding
border
outline
Write a rule to give .card a 2px solid border with color #2d6cdf.
Make .section elements have 16px in this area.
Your text touches the inside edge of the box. What should you increase?
padding
margin
border
font-weight
If a box has width: 300px; padding: 20px; border: 4px solid, with default content-box, what is the total visual width?
324px
340px
348px
300px
Set paragraphs to 16px with line-height: 1.6 (two properties in one rule).
Which sets links to blue #2d6cdf while leaving paragraphs dark gray?
p { color: #2d6cdf; } a { color: #333333; }
a, p { color: #2d6cdf; }
a { color: #2d6cdf; } p { color: #333333; }
a { background-color: #2d6cdf; } p { color: #333333; }
To style all second heading elements, the selector you would use is: (a)
To style the element with the id joke1, the selector is: (a)
To style any element with the class about, the selector is: (a)
The CSS property that changes text color is: (a)
The CSS property that changes the page or box background color is: (a)
Write one rule that sets every <p> tag’s text to #333333
The card uses id="card". Write one rule that sets its background to #fff7e6.
Titles use the id title. Write one rule that sets the font size to 28px
