Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSS

Total questions: 25

Worksheet time: 5mins

Name
Class
Date
1.

Expand CSS.

(a)  

2.

Which of these is the correct syntax for CSS?

a)

selector {property: value;}

b)

{selector: property; value}

c)

property {value; selector}

d)

None of these

3.

Which CSS selector selects and styles a part of an element?

a)

Pseudo-elements selectors

b)

Pseudo-class selectors

c)

Simple selectors

d)

Combinator selectors

4.

How do you write CSS comments?

a)

/*Comment lines*/

b)

//Comment lines//

c)

<!--Comment lines-->

d)

#Comment lines

5.

What is the hexadecimal value for the color red?

(a)  

6.

Which of these is the correct method to add a blue background color in CSS?

a)

body {background: blue;}

b)

body {background-color: blue;}

c)

body {background-body: blue;}

d)

body-background {blue};

7.

The (a)   property specifies what kind of border to display.

8.

___________ is used to create space around elements, outside of any defined borders.

a)

Margin

b)

Padding

9.

____________ is used to create space around an element's content, inside of any defined borders.

a)

Margin

b)

Padding

10.

The CSS (a)   property is used to set the maximum width of an element.

11.

The (a)   property adds space between an outline and the edge/border of an element.

12.

Which property is used to remove underlines from links?

a)

text-decoration

b)

link-style

c)

text-underline

d)

link-underline

13.

What is the generic font family of this font?

a)

Serif

b)

Sans-serif

c)

Monospace

d)

Cursive

e)

Fantasy

14.

What does a:active represent?

a)

A normal, unvisited link.

b)

A link the user has visited.

c)

A link when the user mouse-overs it.

d)

A link the moment it is clicked.

15.

The (a)   property specifies an image as the list item marker.

16.

Select the block-level element(s) from the options given below.

a)

<div>

b)

<p>

c)

<a>

d)

<img>

17.

An element with __________ is not positioned in any special way; it is always positioned according to the normal flow of the page

a)

position: static;

b)

position: relative;

c)

position: fixed;

d)

position: absolute;

e)

position: sticky;

18.

The CSS (a)   property controls what happens to content that is too big to fit into an area.

19.

The CSS ____ property specifies what elements can float beside the cleared element and on which side.

a)

float

b)

clear

20.

What is the symbol for general sibling selector?

(a)  

21.

Which property specifies the transparency of an element?

(a)  

22.

The ______ selector is used to select elements with an attribute value containing a specified word.

a)

[attribute~="value"]

b)

[attribute="value"]

c)

[attribute]

d)

[attribute|="value"]

23.

Which CSS counter property creates or resets a counter?

(a)  

24.

Select all absolute length units.

a)

cm

b)

pc

c)

em

d)

vmin

25.

Which rule in CSS is used to add more importance to a property/value than normal?

(a)