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 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 as a shorthand to specify a number of other background properties?

A - background-attachment

B - background

C - background-repeat

D - background-position

Answer : B

Explanation

The background property is used as a shorthand to specify a number of other background properties.

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 set the text shadow around a text?

A - white-space

B - text-shadow

C - text-decoration

D - text-transform

Answer : B

Explanation

The text-shadow property is used to set the text shadow around a text.

Q 7 - Which of the following property of a table element allows browsers to speed up layout of a table by using the first width properties it comes across for the rest of a column rather than having to load the whole table before rendering it?

A - :table-layout

B - :border-spacing

C - :caption-side

D - :empty-cells

Answer : A

Explanation

The table-layout allows browsers to speed up layout of a table by using the first width properties it comes across for the rest of a column rather than having to load the whole table before rendering it.

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 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 property specifies the bottom padding of an element?

A - padding-bottom

B - padding-top

C - padding-left

D - padding-right

Answer : A

Explanation

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

css_questions_answers.htm
Advertisements