wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Introduction to CSS Quiz

Total questions: 60

Worksheet time: 30mins

Name
Class
Date
1.

CSS stands for:

a)

Cascading Style Sheets

b)

Creative Style Sheets

c)

Colorful Style Sheets

d)

Computer Style Sheets

2.

CSS was first developed in:

a)

1995

b)

1996

c)

1997

d)

1998

3.

CSS1 was introduced in:

a)

1995

b)

1996

c)

1997

d)

1998

4.

CSS2 was published in:

a)

1997

b)

1998

c)

1999

d)

2000

5.

Which CSS version introduced rounded corners, background decoration, and box shadows?

a)

CSS1

b)

CSS2

c)

CSS2.1

d)

CSS3

6.

A CSS declaration must always end with:

a)

Comma

b)

Colon

c)

Semicolon

d)

Period

7.

In CSS, which of the following is a valid comment?

a)

// This is a comment

b)
c)

/* This is a comment */

d)

# This is a comment

8.

The selector id is defined with a:

a)

.

b)

#

c)

@

d)

$

9.

Which of the following selectors is used for a single, unique element?

a)

Class

b)

Tag

c)

Id

d)

Universal

10.

The CSS class selector is defined with a:

a)

.

b)

#

c)

@

d)

$

11.

How many ways can you insert CSS into a web page?

a)

1

b)

2

c)

3

d)

4

12.

Internal styles are defined in which section of an HTML page?

a)

Body

b)

Head

c)

Footer

d)

Header

13.

Inline styles are applied:

a)

In the head section

b)

In an external CSS file

c)

Within an HTML element

d)

In the footer section

14.

Which property is used to specify the background color of an element?

a)

color

b)

background

c)

background-color

d)

background-image

15.

Which property is used to set an image as the background?

a)

background-color

b)

background-image

c)

background-repeat

d)

background-position

16.

By default, the background image is repeated:

a)

Horizontally

b)

Vertically

c)

Both horizontally and vertically

d)

No repeat

17.

Which property is used to set the color of text?

a)

text-color

b)

color

c)

font-color

d)

background-color

18.

The text-align property can align text to:

a)

Left

b)

Right

c)

Center

d)

All of the above

19.

Which property removes the underline from hyperlinks?

a)

text-decoration

b)

text-decoration

c)

text-underline

d)

none of the above

20.

Which value of the text-transform property converts text to uppercase?

a)

lowercase

b)

capitalize

c)

uppercase

d)

none of the above

21.

Which property is used to set the indent of the first line of text?

a)

text-indent

b)

text-align

c)

text-transform

d)

text-decoration

22.

Which property is used to change the font family of text?

a)

font-family

b)

font-style

c)

font-size

d)

font-weight

23.

The property to set italic text is:

a)

font-family

b)

font-style

c)

font-size

d)

font-weight

24.

Which unit is a relative size for fonts recommended by W3C?

a)

px

b)

pt

c)

em

d)

cm

25.

Which property is used to set the space between the element border and the element content?

a)

margin

b)

padding

c)

border

d)

outline

26.

Which property is used to set the space outside the border of an element?

a)

margin

b)

padding

c)

border

d)

outline

27.

Which property is used to set the style of an element's border?

a)

border-color

b)

border-style

c)

border-width

d)

border-padding

28.

The shorthand property for margin can be specified as:

a)

margin: top right bottom left;

b)

margin: left right top bottom;

c)

margin: top left right bottom;

d)

margin: bottom left top right;

29.

Which CSS property is used to set the width of an element?

a)

height

b)

width

c)

size

d)

dimension

30.

Which property in CSS3 is used to add rounded borders to elements?

a)

border-radius

b)

border-style

c)

border-color

d)

border-width

31.

Which property is used to apply shadow to text in CSS3?

a)

box-shadow

b)

text-shadow

c)

shadow

d)

font-shadow

32.

Which CSS3 property attaches one or more drop shadows to an element's box?

a)

box-shadow

b)

text-shadow

c)

shadow

d)

eleme

33.

Which CSS3 property attaches one or more drop shadows to an element's box?

a)

box-shadow

b)

text-shadow

c)

shadow

d)

element-shadow

34.

Which CSS3 property is used to define the size of a background image?

a)

background-size

b)

background-width

c)

background-height

d)

background-dimension

35.

The background-repeat property can have which of the following values?

a)

repeat

b)

repeat-x

c)

repeat-y

d)

All of the above

36.

Which property is used to specify the position of the background image?

a)

background-position

b)

background-align

c)

background-set

d)

background-move

37.

The background-attachment property can have which of the following values?

a)

scroll

b)

fixed

c)

local

d)

Both A and B

38.

The background-size property can have which of the following values?

a)

auto

b)

cover

c)

contain

d)

All of the above

39.

The CSS box-sizing property can have which of the following values?

a)

content-box

b)

padding-box

c)

border-box

d)

All of the above

40.

Which property is used to add space between the border and the content in a box?

a)

margin

b)

padding

c)

space

d)

gap

41.

Which property is used to define the color of the border?

a)

border-color

b)

border-style

c)

border-width

d)

border-color

42.

Which property is used to specify the width of the border?

a)

border-size

b)

border-width

c)

border-length

d)

border-thickness

43.

The position property can have which of the following values?

a)

static

b)

relative

c)

absolute

d)

All of the above

44.

Which value of the position property places an element in its normal position in the document flow?

a)

static

b)

relative

c)

absolute

d)

fixed

45.

Which value of the position property positions an element relative to its normal position?

a)

static

b)

relative

c)

absolute

d)

fixed

46.

Which value of the position property positions an element relative to its first positioned (not static) ancestor element?

a)

static

b)

relative

c)

absolute

d)

fixed

47.

The float property is used for:

a)

Moving elements to the left or right

b)

Applying shadow effects

c)

Adding rounded corners

d)

Allowing text to wrap around an image

48.

Which property is used to prevent an element from floating next to a floated element?

a)

clear

b)

float-clear

c)

no-float

d)

float-stop

49.

The clear property can have which of the following values?

a)

none

b)

left

c)

right

d)

All of the above

50.

Which value of the clear property clears floats from both sides?

a)

both

b)

none

c)

left

d)

right

51.

Flexbox layout is designed for:

a)

One-dimensional layout

b)

Two-dimensional layout

c)

Three-dimensional layout

d)

None of the above

52.

Which property is used to define the direction of the flex container's main axis?

a)

flex-direction

b)

flex-wrap

c)

flex-flow

d)

flex-order

53.

Which property is used to define whether the flex items should wrap or not?

a)

flex-direction

b)

flex-wrap

c)

flex-flow

d)

flex-order

54.

The align-items property aligns flex items:

a)

Along the main axis

b)

Along the cross axis

c)

In both axes

d)

None of the above

55.

Grid layout is designed for:

a)

One-dimensional layout

b)

Two-dimensional layout

c)

Three-dimensional layout

d)

None of the above

56.

Which property is used to define the number of columns in a grid layout?

a)

grid-columns

b)

grid-template-columns

c)

column-template

d)

grid-columns-template

57.

Which property is used to define the size of rows and columns in a grid layout?

a)

grid-size

b)

grid-template

c)

grid-gap

d)

grid-row/column

58.

The grid-gap property is used to specify:

a)

The space between rows only

b)

The space between columns only

c)

The space between rows and columns

d)

The space within rows and columns

59.

Which CSS property is used to apply a transition effect to an element?

a)

transition

b)

animate

c)

transform

d)

transition-effect

60.

The transition-property property specifies:

a)

The name of the property to transition

b)

The duration of the transition effect

c)

The timing function of the transition effect

d)

The delay before the transition starts