CSS Online Quiz


Advertisements


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 element based on its id?

A - The Id Selector

B - The Universal Selector

C - The Descendant Selector

D - The Class Selector

Answer : A

Explanation

The Id Selector matches a element based on its id attribute.

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

A - %

B - cm

C - em

D - ex

Answer : B

Explanation

cm − Defines a measurement in centimeters.

Answer : D

Explanation

All of the above options are correct.

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 align the text of a document?

A - text-indent

B - text-align

C - text-decoration

D - text-transform

Answer : B

Explanation

The text-align property is used to align the text of a document.

Q 6 - Which of the following property is used to set the opacity of an image?

A - border

B - height

C - width

D - -moz-opacity

Answer : D

Explanation

The -moz-opacity property is used to set the opacity of an image.

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 color of right border?

A - :border-top-color

B - :border-left-color

C - :border-right-color

D - :border-bottom-color

Answer : C

Explanation

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

Q 9 - Which of the following property specifies a shorthand property for setting the margin properties in one declaration?

A - :margin

B - :margin-bottom

C - :margin-top

D - :margin-left

Answer : A

Explanation

The margin specifies a shorthand property for setting the margin properties in one declaration.

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