CSS Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to CSS. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - Which of the following selector matches a particular element only when it lies inside a particular element?

A - The Type Selector

B - The Universal Selector

C - The Descendant Selector

D - The Class Selector

Answer : C

Explanation

The Descendant Selector matches a particular element only when it lies inside a particular element.

Q 2 - Which of the following defines a measurement in inches?

A - in

B - mm

C - pc

D - pt

Answer : A

Explanation

in − Defines a measurement in inches.

Q 3 - Which of the following defines a measurement in points?

A - in

B - mm

C - pc

D - pt

Answer : D

Explanation

pt − Defines a measurement in points. A point is defined as 1/72nd of an inch.

Q 4 - Which of the following property is used to control the scrolling of an image in the background?

A - background-attachment

B - background

C - background-repeat

D - background-position

Answer : A

Explanation

The background-attachment property is used to control the scrolling of an image in the background.

Q 5 - Which of the following property is used to add or subtract space between the words of a sentence?

A - color

B - direction

C - letter-spacing

D - word-spacing

Answer : D

Explanation

The word-spacing property is used to add or subtract space between the words of a sentence.

Q 6 - Which of the following property is used to capitalize text or convert text to uppercase or lowercase letters?

A - text-indent

B - text-align

C - text-decoration

D - text-transform

Answer : D

Explanation

The text-transform property is used to capitalize text or convert text to uppercase or lowercase letters.

Q 7 - Which of the following property of a anchor element signifies an element on which the user is currently clicking?

A - :link

B - :visited

C - :hover

D - :active

Answer : D

Explanation

The :active signifies an element on which the user is currently clicking.

Q 8 - Which of the following property changes the width of left border?

A - :border-bottom-width

B - :border-top-width

C - :border-left-width

D - :border-right-width

Answer : C

Explanation

The border-left-width changes the width of left border.

Q 9 - Which of the following property specifies the left margin of an element?

A - :margin

B - :margin-bottom

C - :margin-top

D - :margin-left

Answer : D

Explanation

The margin-left specifies the left margin of an element.

Q 10 - Which of the following value of cursor shows it as a pointing hand?

A - crosshair

B - default

C - pointer

D - move

Answer : C

Explanation

pointer: A pointing hand (in IE 4 this value is hand).

css_questions_answers.htm
Advertisements