wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSS Quiz

Total questions: 52

Worksheet time: 1hrs 18mins

Name
Class
Date
1.

Which of the following is NOT a way to include CSS in an HTML document?

a)

Inline CSS

b)

Embedded CSS

c)

Imported CSS

d)

Internal JavaScript

2.

Which CSS method has the highest priority?

a)

External CSS

b)

Embedded CSS

c)

Inline CSS

d)

Imported CSS

3.

What attribute of specifies the stylesheet location?

a)

src

b)

href

c)

path

d)

style

4.

What is the default value of the media attribute in ?

a)

screen

b)

all

c)

print

d)

projection

5.

What will be the color of the text?

a)

Red

b)

Blue

c)

Black

d)

Browser default

6.

Which syntax is correct for CSS comments?

a)

// comment

b)

c)

/* comment */

d)

# comment

7.

Which unit is relative to the size of the parent element?

a)

px

b)

em

c)

cm

d)

in

8.

What will be the letter spacing?

a)

12pt

b)

24pt

c)

2px

d)

Depends on font size

9.

Which property is used to align text?

a)

text-indent

b)

text-align

c)

word-spacing

d)

text-transform

10.

What value of text-transform makes all letters capitalized?

a)

uppercase

b)

lowercase

c)

capitalize

d)

bold

11.

How will the text appear?

a)

Center aligned with underline

b)

Left aligned with strike-through

c)

Center aligned with strike-through

d)

Justified text with bold

12.

Which property is used to prevent a background image from repeating?

a)

background-attachment

b)

background-repeat

c)

background-position

d)

background-color

13.

What effect does this code create?

a)

Image repeats horizontally and vertically

b)

Image repeats only horizontally

c)

Image appears once and stays fixed while scrolling

d)

Image does not appear

14.

Which property makes text italic?

a)

font-style

b)

font-weight

c)

font-variant

d)

text-transform

15.

Which property sets small-caps style?

a)

font-size

b)

font-variant

c)

font-stretch

d)

font-transform

16.

What effect does this have?

a)

Extra thin text

b)

Very bold text

c)

Normal text

d)

Italic text

17.

Which attribute of