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 relative to a font's x-height?

A - %

B - cm

C - em

D - ex

Answer : D

Explanation

ex − This value defines a measurement relative to a font's x-height. The x-height is determined by the height of the font's lowercase letter x.

Answer : D

Explanation

All of the above options are correct.

Q 4 - Which of the following property is used to set the background color of an element?

A - background-color

B - background-image

C - background-repeat

D - background-position

Answer : A

Explanation

The background-color property is used to set the background color of an element.

Q 5 - Which of the following property is used to increase or decrease how bold or light a font appears?

A - font-family

B - font-style

C - font-variant

D - font-weight

Answer : D

Explanation

The font-weight property is used to increase or decrease how bold or light a font appears.

Q 6 - Which of the following property is used to control the flow and formatting of text?

A - white-space

B - text-shadow

C - text-decoration

D - text-transform

Answer : A

Explanation

The white-space property is used to control the flow and formatting of text.

Q 7 - Which of the following property changes the color of bottom border?

A - :border-color

B - :border-style

C - :border-width

D - :border-bottom-color

Answer : D

Explanation

The border-bottom-color changes the color of bottom border.

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

A - :border-bottom-style

B - :border-top-style

C - :border-left-style

D - :border-right-style

Answer : C

Explanation

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

Q 9 - Which of the following property serves as shorthand for the marker properties?

A - list-style-type

B - list-style-position

C - list-style-image

D - list-style

Answer : D

Explanation

The list-style serves as shorthand for the marker properties.

Q 10 - Which of the following property specifies the distance between a marker and the text in the list?

A - marker-offset

B - list-style-position

C - list-style-image

D - list-style

Answer : A

Explanation

The marker-offset specifies the distance between a marker and the text in the list.

css_questions_answers.htm
Advertisements