Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSS3

Total questions: 27

Worksheet time: 14mins

Name
Class
Date
1.

Cascading Style Sheet rules are comprised of:

a)

Selectors and Declarations

b)

Properties and Declarations

c)

Selectors and Attributes

d)

Elements and Attributes

2.

CSS is coded in the body of the web page as an attribute of an HTML tag it is called ________.

a)

Embedded

b)

Inline

c)

External

d)

Imported

3.

Select the items below that can be used as a CSS Selector.

a)

an HTML element

b)

a class name

c)

an id name

d)

All of the above

4.

Which of the following will configure all the span elements with red (#FF0000) text color?

a)

span { color: #FF0000; }

b)

#span { color: #FF0000; }

c)

span { color: #FF0000; }

d)

<span style=”color: #FF0000;”>

5.

To apply a style to one or more of elements on a web page, configure a CSS _____________.

a)

group

b)

id

c)

class

d)

attribute

6.

An External Style Sheet uses the _____ file extension.

a)

ess

b)

css

c)

html

d)

No file extension is necessary

7.

Use the ______ element to associate a web page with an external style sheet.

a)

target

b)

a

c)

include

d)

link

8.

Select the code below that uses CSS to configure a background color of #eaeaea for a web page.

a)

body {background-color:#eaeaea; }

b)

document {background-page:#eaeaea; }

c)

body {bgcolor:#eaeaea; }

d)

None of the above

9.

Select the code below that configures a class called “offer” with blue text using CSS.

a)

offer { color: blue; }

b)

.offer { color: blue; }

c)

.offer { text: blue; }

d)

#offer { color: blue; }

10.

Use the ______ element to create logical areas on a web page that are embedded within paragraphs or other block formatting elements.

a)

div

b)

span

c)

both a and b

d)

neither a nor b

11.

Use the _____ element to code embedded styles on a web page.

a)

link

b)

style

c)

embed

d)

css

12.

Use the ______ element to create a generic area or section on a web page that is physically separated from others.

a)

div

b)

strong

c)

h1

d)

small

13.

CSS was first approved as a standard by the W3C in ______.

a)

1996

b)

2002

c)

1992

d)

none of the above

14.

Which of the following is the CSS property used to set the background color?

a)

bgcolor

b)

background-color

c)

color

d)

none of the above

15.

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

a)

bgcolor

b)

background-color

c)

color

d)

none of the above

16.

According to the CSS order of precedence, ______ styles override ________ styles. 

a)

external, embedded 

b)

embedded, inline 

c)

inline, external 

d)

external, inline

17.

Which of the following is a CSS selector that will configure the anchor elements within the nav element.

a)

nav a

b)

.nav a

c)

nav anchor

d)

#nav a

18.

To apply a style to exactly one element on a web page, configure a CSS _____________.

a)

group

b)

id

c)

class

d)

None of the above

19.

Where do you place the code to associate a web page with an external style sheet?

a)

in the external style sheet

b)

in the DOCTYPE of the web page document

c)

in the body section of the web page document

d)

in the head section of the web page document

20.

Which of the following is a CSS selector that will configure the paragraph elements within the footer element.

a)

p footer

b)

footer p

c)

#footer p

d)

.footer p

21.

Which of the following symbols terminates a style declaration?

a)

: colon

b)

; semi-colon

c)

! exclamation mark

d)

# hash mark

22.

Which of the following is an HTML attribute that configures inline styles?

a)

link

b)

style

c)

id

d)

type

23.

Which of the following is correct CSS syntax?

a)

p { color: #000000; }

b)

p { color=#000000; }

c)

p : color #000000;

d)

p { color;#000000; }

24.

Which type of selector is specified by placing a # symbol in front of the selector name?

a)

tag

b)

first

c)

class

d)

id

25.

True or False____ Embedded styles override or take precedence over external styles.

a)

True

b)

False

26.

True or False_____ External styles override or take precedence over inline styles.

a)

True

b)

False

27.

True or False ____Hexadecimal is a base 16 numbering system

a)

True

b)

False