wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

CSS QUIZ

Total questions: 50

Worksheet time: 26mins

Name
Class
Date
1.

What Is The Acroymn For CSS

a)

Cascading Style Sheet

b)

Computer Style Sheet

c)

Casscading Style Sheet

2.

WHAT IS CSS

(a)  

3.

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

a)

<css>

b)

<!DOCTYPE html>

c)

<script>

d)

<style>

4.

Which of the following has introduced text, list, box, margin, border, color, and background properties?

a)

HTML

b)

CSS

c)

JAVASCRIPT

d)

PHP

5.

Which of the following CSS framework is used to create a responsive design?

a)

django

b)

rails

c)

laravel

d)

bootstrap

6.

Which of the following CSS property is used to make the text bold?

a)

text-decoration: bold

b)

font-weight: bold

c)

font-style: bold

d)

text-align: bold

7.

What will be the output of following CSS code ?

h1 {color: "green";}

a)

Nothings happen

b)

All h1 contents will become green

c)

Only one h1 content will become green

d)

Error occurs

8.

Which of the following is the correct syntax to link an external style sheet in the HTML file?

a)

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

b)

<link rel=”stylesheet” src=”style.css” />

c)

<style rel=”stylesheet” src=”style.css” />

d)

<style rel=”stylesheet” link=”style.css” />

9.

How can we change the text color of an element?


a)

background-color

b)

color

c)

Both A and B

d)

None of the above

10.

In how many ways can CSS be written in?

a)

1

b)

2

c)

3

d)

4

11.

What type of CSS is the following code snippet?

<h1 style="color:blue;">A Blue Heading</h1>

a)

Inline


b)

Internal

c)

External

d)

None of the above

12.

How can we select an element with a specific ID in CSS?


a)

#

b)

.

c)

^

d)

None of the above

13.

How can we select an element with a specific Class in CSS?


a)

#

b)

.

c)

^

d)

None of the above

14.

How can we write comments in CSS?


a)

/* */

b)

//

c)

#

d)

All of the above

15.


In the below code snippet, in what order will the margins be added?


p { margin: 25px 50px 75px 100px; }

a)

Top, Right, Bottom, Left

b)

Top, Left, Bottom, Right

c)

Top, Bottom, Right, Left

d)

Right, Left, Top, Bottom

16.

How can we specify the spacing between each letter in a text in CSS?


a)

alpha-spacing

b)

letter-spacing

c)

character-spacing

d)

None of the above

17.

Which of the following is the correct way to select all h1 headers in a div element?


a)

div h1

b)

div-h1

c)

h1

d)

None of the above

18.

How can we set the maximum width of the elements content box using CSS?


a)

height property

b)

max-height property

c)

max-width property

d)

None of the above

19.

Which CSS property is used to specify different border styles?


a)

border-style

b)

border

c)

Both A and B

d)

None of the above

20.

Which of the following property specifies the look and design of an outline?


a)

outline-style

b)

outline

c)

outline-font

d)

None of the above

21.

Which of the following are parts of the CSS box model?


a)

Margins

b)

Borders

c)

Padding

d)

All of the above

22.

Which of the following CSS property is used for controlling the layout?


a)

display

b)

color

c)

text

d)

None of the above

23.

Which of the following components of the CSS box model are transparent?


a)

Padding

b)

Margin

c)

Both A and B

d)

Content

24.

Which of the following CSS property specifies the type of list item marker?


a)

list

b)

list-style-type

c)

ul

d)

ol

25.

Which of the following category of style sheet can be used to change the look of an entire website, by changing one file (CSS)?

a)

External CSS

b)

Internal CSS

c)

Both Inline and Internal

d)

Inline CSS

26.

Which of the following category of CSS is defined in the <head> section of an HTML page, within a element?

a)

Inline CSS

b)

Internal CSS

c)

External CSS

d)

Both Internal and External CSS

27.

Which HTML attributes is used to define an inline style?

a)

Font

b)

Style

c)

Styles

d)

Class

28.

How do we display hyperlinks without an underline?

a)

a{text-decoration: no underline;}

b)

a{text-decoration: none;}

c)

a{decoration: no underline;}

d)

a{underline: none;}

29.

How do we make each word in a text start with a capital letter ?

a)

Text-transform: capitalize

b)

Text-transform : uppercase

c)

We can't do that with css

d)

None

30.

How do we make each word in a text start with a capital letter ?

a)

Text-transform: capitalize

b)

Text-transform : uppercase

c)

We can't do that with css

d)

None

31.

To define the space between the

element's border and content, you

use the padding property, but are

you allowed to use negative values?

a)

Yes

b)

No

32.

How do you make a list that lists

its items with squares?

a)

list-type: square

b)

type: 2

c)

type: square

d)

list-style-type: square

33.

Which of the following are valid ways to represent a colour in CSS?

a)

A valid color name

b)

Color code

c)

HEX value

d)

RGB value

e)

All of the above

34.

We can make rounded borders around elements using which CSS element?

a)

Border-collapse

b)

BBorder-rounded

c)

Border-radius

d)

NOne of the above

35.

How can we set the maximum width of the elements content box using CSS?

a)

Height property

b)

Maxheight property

c)

Max-weight property

d)

None of the above

36.

Which of the following property specifies the look and design of an outline?

a)

Outline-style

b)

Outline

c)

None of the above

37.

What does the inherit value for a property do?

a)

Inherits the value of the parents element

b)

Invalid property name

c)

Changes the value of parents element

38.

Setting an inline-block in CSS requires which of the following properties?

a)

Display

b)

Block

c)

Colour

d)

All of the above

39.

Which of the following CSS property is used for controlling the layout?

a)

Display

b)

Text

c)

Colour

d)

NNone Of the above

40.

Which of the following CSS property specifies the origin of the background image?

a)

Background-origin

b)

Background-size

c)

Origin

d)

None of the above

41.

Which of the following can be achieved with CSS lists?

a)

Set different list item markers for ordered lists

b)

Set different list item markers for unordered list

c)

Set an image for list item marker

d)

All of the above

42.

Which of the following CSS property specifies the type of list item marker?

a)

ol

b)

ul

c)

List-style-type

d)

List-style

43.

What value should be passed to the width parameter if we want an element, say a table, to span the entire width of the screen?

a)

100%

b)

50%

c)

25%

d)

0

44.

Which of the following is the correct approach to make a table responsive?

a)

Overflow-x: auto;

b)

Overflow-x: none;

c)

Both A and B

d)

NNone Of the above

45.

What are the uses of CSS pseudo-elements?

a)

Styles specified parts of an element

b)

Style the first letter or line of an element

c)

Insert content before or after elements

d)

None of the above

46.

How can we select elements with a specified attribute in CSS?

a)

[attributes] selector

b)

Property selector

c)

Both A and B

d)

None of the above

47.

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

a)

Relative

b)

Absolute

c)

Both A and B

d)

None of the above

48.

What are the different types of gradients in CSS?

a)

Linear gradient

b)

Conic gradient

c)

Radial gradient

d)

All of the above

49.

Which CSS property is used to create an image reflection?

a)

Box-reflect

b)

Image-reflect

c)

Reflect-img

d)

None of the above

50.

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

a)

Pointer

b)

Default

c)

Arrow

d)

None of above