wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Introduction to CSS

Total questions: 15

Worksheet time: 4mins

Name
Class
Date
1.

Which rule will change the font of the text?

a)

font-size

b)

text-align

c)

font-family

d)

text-decoration

2.

Which rule is used to change the size of text?

a)

font-size:12px;

b)

font-height:12px;

c)

text-size:12px;

d)

size:12px;

3.

Which type of CSS is placed directly within the HTML tags?

a)

Internal

b)

Inline

c)

External

d)

Included

4.

What is wrong with the CSS applied below?

a)

It should say style:colour=red

b)

It should say style="color:red;"

c)

It should say "style=color:red;"

d)

It should say style="font-color:red;"

5.

What term describes one specific feature such as size or color?

a)

Property

b)

Declaration Block

c)

selector

d)

Value

6.

What symbol indicates that numeric values will be hexadecimal instead of decimal?

a)

*

b)

@

c)

#

d)

!

7.

Which of the following lines of code will correctly set the color of text inside a <h2> element to blue, when found in an external CSS file?

a)

h2 {color: blue;}

b)

h2 {text-color:blue;}

c)

style="h2:color,blue;"

d)

h2 text-color:blue

8.

What special element will tell the browser the location of the CSS file?

a)

<css>

b)

<link>

c)

<style>

d)

<script>

9.

What is true about the format of a declaration block found inside a <style> element instead of inline?

a)

The format is the same as inline, but you might add some white-space to put each declaration on a different line.

b)

You do not need to separate declarations with semi-colons at the end.

c)

You can use an equals sign (-) between the property and value

d)

All of the above are true

10.

What does this code do?

<style type="text/css">p{color: blue;}</style>

a)

creates blue text anywhere "text/css" appears on the web page

b)

makes every "p" text character on the web page blue

c)

creates a web page with a blue background

d)

defines a blue color for text inside a paragraph element

11.

How do you create an inline style?

a)

Define a style rule in your < head > area

b)

Add a list of property attributes to the target element

c)

Add a “style” attribute to the target element

d)

Add a “css” attribute to the target element

12.

Which of the following is correct about CSS?

a)

CSS is used to control the style of a web document in a simple and easy way.

b)

CSS is the acronym for "Cascading Style Sheet".

c)

You can write CSS once and then reuse same sheet in multiple HTML pages.

d)

All of the above.

13.

Which of the following is a component of CSS style rule?

a)

selector

b)

property

c)

value

d)

all of the choices

14.

Which of the following property is used to set the color of a text?

a)

Color

b)

text-color

c)

text-decoration

d)

text-format

15.

What is the correct CSS syntax for making all the <p> tag's font size 14px?

a)

p{14px}

b)

p{font-size:14px;}

c)

p{text-size:14px;}

d)

p{size:14px;}