Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Web Technology - CSS - Tutorial Sheet - 02

Total questions: 50

Worksheet time: 8mins

Name
Class
Date
1.

Which of the following tag is used to embed CSS in HTML page?

a)

<css>

b)

<style>

c)

<script>

d)

<!DOCTYPE html>

2.

CSS stands for

a)

Cascading style sheet

b)

Cyber style sheet

c)

Cassandra style sheet

d)

None of the above

3.

What are the three types of style sheet

a)

Internal, external, inline

b)

Inline, internal, extreme

c)

Insidious, internal, external

d)

None of the above

4.

<link type="stylsheet" href="exx.css"> belongs to

a)

External

b)

Internal

c)

Inline

d)

None of the above

5.

Style will come inside head for

a)

External

b)

Inline

c)

Internal

d)

All of the above

6.

When CSS is written inside HTML it will be saved as

a)

css

b)

Jsp

c)

html

d)

php

7.

External css file will be saved as

a)

.css

b)

.html

c)

.php

d)

None of the above

8.

When you use class selector

What should present in front of classname

a)

#

b)

&

c)

@

d)

.

9.

When you use id selector

What should present in front of id name

a)

?

b)

@

c)

#

d)

.

10.

Is CSS

a)

Used in client side scripting

b)

Used in server side scripting

c)

Both server and client side scripting

d)

None of the above

11.
Select the code below that uses CSS to configure a background color of #000000 for a web page.
a)
body { background-color: #000000; }
b)
body { bgcolor: #000000; }
c)
document { background­-page: #000000; }
d)
None of these
12.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
13.
What unit of measurement does CSS use for size?
a)
px
b)
em
c)
%
d)
All work
14.
What property changes the border for an image/table?
a)
border:
b)
border-size:
c)
border-color:
15.

Which is the correct way to format a Font Family for a paragraph? (Hint: make sure you have more than one backup font!)

a)

p { font-family: Arial, Verdana, San-Serif; }

b)

p { font-family: Arial, Verdana, San-Serif; }

c)

p { font-family: Arial, Verdana, San-Serif; }

d)

p { font-family: Arial, Verdana, San-Serif; }

16.

Which rule set would change the font size to 24?

a)

font-size: 24

b)

size: 24;

c)

font-size: 24;

d)

font size: 24;

17.

Which CSS selector applies to the yellow element(s) only? Select the correct answers!

a)

li a{ ... }

b)

li.a{ ... }

c)

li, a{ ... }

d)

li-a{ ...}

e)

none of the above

18.

Which color value in CSS gives a transparency effect?

a)

Color Names

b)

Hex Codes

c)

RGB

d)

RGBA

19.

What will this rule set create?


h1 {

text-decoration: underline overline dotted red;

}

a)

red waves under the heading

b)

red dots over and under the heading

c)

red waves over and under the heading

d)

red dots over the heading

20.
Which line of code correctly places a gif image named "tiger" into a webpage?
a)
<img src="tiger" alt="BengalTiger" />
b)
<img gif=tiger alt="BengalTiger">
c)
<image source="tiger.gif" alt=BengalTiger" />
d)
<img src="tiger.gif" alt="BengalTiger" />
21.
How do we comment a statement in CSS?
a)
By using //
b)
By using /* */
c)
By using //* *//
d)
None of the above
22.
How is external CSS added?
a)
Within the link element, outside the head section
b)
Within the link element, inside the head section
c)
Within the external element, outside the head section
d)
We can not add CSS sheet externally
23.

Where in the HTML document is the correct location to insert code to link to your external CSS? 

a)

In the section

b)

In the section

c)

At the very end of the document

d)

At the very beginning of the document

24.
What symbols go around the properties for each CSS selector?
a)
< >
b)
[ ]
c)
{ }
d)
( )
25.
Which is the selector for a link?
a)
a { }
b)
link { }
c)
href { }
d)
a href { }
26.
What is the difference between HTML and CSS?
a)
CSS is one type of HTML
b)
HTML gives a webpage structure. CSS provides styling.
c)
CSS structures a webpage. HTML strictly provides styling.
d)
There is no difference.
27.
The style that you are applying to a selector, e.g. border.
a)
Property
b)
Value
c)
Keyword
d)
Length Units
28.
What is this an example of?
/* This is a multi-line comment */
a)
Syntax
b)
Property 
c)
Value
d)
Comment
29.
________ positioning keeps the element in the normal document flow, while ________ positioning takes it out of the normal flow.
a)
relative, absolute
b)
absolute, relative
c)
fixed, static
d)
parallel, universal
30.
________ positioning keeps the element in the normal document flow, while ________ positioning takes it out of the normal flow.
a)
relative, absolute
b)
absolute, relative
c)
fixed, static
d)
parallel, universal
31.

Which CSS embedded rule is used to assign the location of the image on a web page?

a)

background-position

b)

background-attachment

c)

background-repeat

32.

Which of the following phrases must be added to CSS embedded code to stop the background image from scrolling with the text?

a)

fixed

b)

no-scroll

c)

cover

33.

What word must be added to the code "background-size:" to make the image fill the entire web page background?

a)

cover

b)

fill

c)

replace

34.

Which CSS embedded rule allows the text to scroll but the image to stay still?

a)

background-attachment

b)

background-position

c)

background-repeat

35.

Which of the following CSS embedded codes will add a background image to the web page.

a)

body {background-image:url("link goes here");}

b)

body{img src="link goes here";}

36.

How to display a background image in the above format:

a)

background-repeat: repeat-x;

b)

background-image: repeat;

c)

background-repeat: horizontal;

d)

background-image: repeat-y;

37.
Which is correct CSS syntax? 
a)
{ body; color=black;}
b)
body: color= black
c)
body {color:black;}
d)
(body color is black) 
38.

Identify CSS property to assign position for a background image.

a)

display: value;

b)

position: value

c)

background-postion: value;

d)

align: value;

39.

What HTML input type is used to create this form selections?

a)

<input type="text">

b)

<input type="submit">

c)

<input type="password">

d)

<input type="radio">

40.
What is the proper code to insert an image named "frog.jpg"?
a)
<img src="frog" width="104" height="142">
b)
<img="frog.jpg" width="104" height="142">
c)
<img src="frog.jpg" width="104" height="142">
d)
<img ="frog" width="104" height"142">
41.

What will the following .content class do?


.content { margin-left: 210px; }

a)

A 210px border to the left

b)

A 210px border to the right

c)

210px padding to the left

d)

210px margin to the left

42.

How can we position an image to the left?

a)

float: left;

b)

align: left;

c)

padding: left;

d)

margin: left;

43.

How do you change font sizes in CSS?

a)

font-family: 20pt;

b)

font-weight: 20pt;

c)

font-size: 20pt;

d)

font-align: 20px;

44.

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

a)

white-space

b)

margin

c)

padding

d)

width and height

45.

Pseudo-selector to detect mouse movement over an element

(a)  

46.

The element is positioned relative to its first positioned ancestor element

a)

static

b)

relative

c)

absolute

d)

fixed

47.

Default value of flex-direction

(a)  

48.
How to change the below code to inline CSS code <p><font color = "green" size = "5">Hello, World!</font></p>
a)
<p style = "font-color:green; font-size:24px;" >Hello, World!</p>
b)
<p style = "color:green; font-size:24px;" >Hello, World!</p>
c)
<p style = "font color:green, size:24px;" >Hello, World!</p>
d)
<p style = "color:green; size:24px;" >Hello, World!</p>
49.

Which of the below options is correct to change the background color to blue in CSS?

a)

body {

background-colour: lightblue;

}

b)

body {

background-color: lightblue;

}

c)

body {

background:color: lightblue;

}

d)

None of the above

50.
Which of the following properties is used to specify the kind of border to display?
a)
border
b)
border:style
c)
border-style
d)
None of the above