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 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.

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

A - in

B - mm

C - pc

D - pt

Answer : C

Explanation

pc − Defines a measurement in picas. A pica is equivalent to 12 points; thus, there are 6 picas per inch.

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

A - background-color

B - background-image

C - background-repeat

D - background-position

Answer : D

Explanation

The background-position property is used to control the position 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 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 allows you to control the shape or appearance of the marker of a list?

A - list-style-type

B - list-style-position

C - list-style-image

D - list-style

Answer : A

Explanation

The list-style-type allows you to control the shape or appearance of the marker.

Q 10 - Which of the following property specifies the right padding of an element?

A - padding-bottom

B - padding-top

C - padding-left

D - padding-right

Answer : D

Explanation

The padding-right specifies the right padding of an element.

css_questions_answers.htm
Advertisements