wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Web Design Unit 3 CSS

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Which of the following is a valid CSS rule?

a)

h1 {

color: blue;

}

b)

style="color:blue;"

c)

css="color:blue;"

d)

h1 {

color {

blue;

}

}

2.

Why do we use CSS?

a)

HTML wasn’t intended to be able to style web pages, CSS allows

us to add style

b)

Separate the content of a web page from the design of a web page

c)

Easily modify the look and feel of a web site even at a large scale

d)

All of the above

3.

Which of the following CSS rules will select the HTML element with the id logo and set the font size for

that element to 60 pixels?

a)

logo {

font-size: 60px;

}

b)

.logo {

font-size: 60px;

}

c)

#logo {

font-size: 60px;

}

d)

id="logo" {

font-size: 60px;

}

4.

Change the border size of the body or image

a)

border-style

b)

border-width

c)

border-color

d)

width

5.

To create a dotted border around the page

a)

border-style

b)

border-width

c)

border-color

d)

width

6.

Set the color of the border

a)

border-style

b)

border-width

c)

border-color

d)

width

7.

sets the color of words in a paragraph

a)

h1 {

color: pink;

}

b)

img {

color: pink;

}

c)

body {

color: pink;

}

d)

p {

color: pink;

}

8.

What does a class do?

a)

adds color to words

b)

adds style to specific elements

c)

adds style to a whole page

d)

adds a lot more work

9.

Select the rule set to make all the text in your web page blue and centered.

a)

p {

color: blue;

}

b)

body {

text-align: left;

color: blue;

}

c)

p {

text-align: center;

color: blue;

}

d)

body {

text-align: center;

color: blue;

}

10.

Which selector will change the font of the text?

a)

font-size

b)

text-align

c)

font-famiy

d)

text-decoration

11.

Which rule set would change the font size to 24?

a)

font-size: 24

b)

size: 24;

c)

font-size: 24;

d)

font size: 24;

12.
If you want to have more than one property for a CSS selector, what character separates them?
a)
comma (,)
b)
semi-colon (;)
c)
colon (:)
d)
dash (-)
13.
Where in the HTML document is the correct location to insert code to link to your external CSS? 
a)
In the <head> section
b)
In the <body> section
c)
At the very end of the document
d)
At the very beginning of the document
14.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
15.
Which CSS code centers text?
a)
p {align: center;}
b)
p {text-align: center;}
c)
p {align=center;}
d)
p {center;}
16.
How do I remove the underline from a link using CSS?
a)
a {underline: none;}
b)
a {text-decoration: none;}
c)
a {style: none;}
d)
link {underline: none;}
17.
The code for the comment tag in CSS is
a)
<!-- comment -->
b)
<!-- comment >
c)
/* comment /*
d)
/* comment */
18.
Which is the selector in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
19.
Which is the property in this CSS?
p {color: red;}
a)
p
b)
color
c)
red
20.
Which is the Value in the CSS?
p {color: red;}
a)
p
b)
color
c)
red