wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CSS Quiz

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

If we want define style for an unique element, then which css selector will we use ?

a)

Id

b)

element

c)

class

d)

child

2.

Can we align a Block element by setting the left and right margins ?

a)

Yes

b)

Not possible

3.

If we want to wrap a block of text around an image, which css property will we use ?

a)

wrap

b)

push

c)

float

d)

align

4.

If we want to show an Arrow as cursor, then which value we will use ?

a)

pointer

b)

default

c)

arrow

d)

arr

5.

Which element is used in the <HEAD> section on an HTML page, if we want to use an external style sheet file to decorate the page ?

a)

<src>

b)

<link>

c)

<style>

d)

<css>

6.

Which attribute can be added to many HTML elements to identify them as a member of a specific group ?

a)

id

b)

div

c)

class

d)

span

7.

When we write <img src="img.png">, what "img.png" inside double quote implies?

a)

element

b)

attribute

c)

value

d)

operator

8.

Which css property you will use if you want to add some margin between a DIV's border and its inner text ?

a)

spacing

b)

margin

c)

padding

d)

inner-margin

9.

Which CSS property is used to control the text size of an element ?

a)

font-style

b)

text-size

c)

font-size

d)

text-style

10.

The default value of "position" attribute is _________.

a)

fixed

b)

absolute

c)

sticky

d)

relative

11.

How will you make all paragraph elements 'RED' in color ?

a)

.p.all {color: red;}

b)

.* {color: #990000;}

c)

all.p {color: #998877;}

d)

p {color: red;}

12.

By default Hyperlinks are displayed with an underline. How do you remove the underline from all hyperlinks by using CSS code ?

a)

a {text: no-underline;}

b)

a {text-decoration:none;}

c)

a {text-style: no-underline;}

d)

a {text-decoration: no-underline;}

13.

The elements <DIV> and <SPAN> have the following characteristics

a)

Element <DIV> inherits properties defined for <SPAN> in a stylesheet

b)

Elements <SPAN> and <DIV> define content to be inline or block-level

c)

<DIV> and <SPAN> are used as alternatives for the element <P>

d)

<DIV> is used inside element <P>.

14.

Which is not a property of attribute Behaviour of <Marquee> tag?

a)

alternate

b)

blur

c)

scroll

d)

slide

15.

How can you open a link in a new browser window?

a)

<a href="url" new>

b)

<a href="url" target="new">

c)

<a href="url" target="_blank">

d)

<a href="url" target="">

16.

How many different styling techniques are used in CSS?

a)

2

b)

4

c)

3

d)

1

17.

Select the correct among the following for linking an external style sheet.

a)

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

b)

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

c)

<link>stylesheet

d)

<link href=“style.css”>stylesheet

18.

Which of the following is the correct CSS syntax?

a)

p:color=green, font-size=15px

b)

{p:color=green, font-size=15px}

c)

p {color:green, font-size:15px;}

d)

p {color:green; font-size:15px;}

19.

If "padding: 10px 5px 20px 0px" is given. What does this represent?

a)

left:10px , top:5px , right:20px , bottom:0px

b)

top:10px , right:5px , bottom:20px , left:0px

c)

right:10px , bottom:5px , left:20px , top:0px

d)

bottom:10px , left:5px , top:20px , right:0px

20.

Which is the correct syntax to set the unordered-list item marker to a square.

a)

<ul style=“list-style-type:square”>

b)

<ul style=“square”>

c)

<ul list-style: “square”>

d)

<ul style=square>