wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Cascading Style Shenanigans: A CSS Quiz for the Witty Web Wizar

Total questions: 15

Worksheet time: 5mins

Name
Class
Date
1.

Which of the following tag is used to embed css in html page?

a)

<css>

b)

<!DOCTYPE html>

c)

<script>

d)

<style>

2.

Which of the following CSS selector is used to specify a rule to bind a particular unique element?

a)

tag

b)

id and tag

c)

class

d)

id

3.

Which CSS property allows you to specify an image to be used instead of the normal border around an element?

a)

border-background

b)

border-bgimage

c)

border-image

d)

none of the above

4.

What is the correct syntax for referring an external CSS?

a)

<link rel="stylesheet" type="text/css" href="style.css">

b)

<style rel="stylesheet" type="text/css" href="style.css">

c)

both of the above

d)

none of the above

5.

Which of the following CSS properties specifies the stack order of elements?

a)

opacity

b)

z-index and overlap

c)

z-index and opacity

d)

z-index

6.

How many layout modes were there before the Flexbox Layout Module was introduced in CSS?

a)

2

b)

6

c)

4

d)

3

7.

What does the "viewport" refer to in the context of responsive web design?

a)

The browser's title bar

b)

The visible area of a webpage in the browser

c)

The device's physical screen

d)

The URL of the website

8.

What is default position of an element ?

a)

fixed

b)

relative

c)

static

d)

sticky

9.

Setting the position to relative makes the element appear on bottom of any other static element in its area.

a)

TRUE

b)

FALSE

10.

The default value for the float property is right

a)

TRUE

b)

FALSE

11.

A ___________ is used to define a special state of an element.

a)

pseudo-tag

b)

pseudo-id

c)

pseudo-element

d)

pseudo-class

12.

For which rule is plus sign (+) used in CSS ?

a)

parent selector

b)

attribute selectors

c)

adjacent-sibling selector

d)

class selectors

13.

Which of the following selector selects all elements of E that have the attribute attr that end with the given value 'val'?

a)

E[attr^=val]

b)

E[attr^$=val]

c)

E[attr=val]

d)

E[attr*=val]

14.

Which CSS property is used to make the text wrap around an image in responsive layout ?

a)

float

b)

flex-wrap

c)

image-warp

d)

text-flow

15.

Which of the following are units of relative length in CSS?

a)

em

b)

rem

c)

vmax

d)

all of the above