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 is a component of CSS style rule?

A - Selector

B - Property

C - Value

D - All of the above.

Answer : D

Explanation

All of the above options are correct.

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.

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 create a small-caps effect?

A - font-family

B - font-style

C - font-variant

D - font-weight

Answer : C

Explanation

The font-variant property is used to create a small-caps effect.

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 width of an image?

A - border

B - height

C - width

D - -moz-opacity

Answer : C

Explanation

The width property is used to set the width of an image.

Q 7 - Which of the following property of a table element specifies the width that should appear between table cells?

A - :border-collapse

B - :border-spacing

C - :caption-side

D - :empty-cells

Answer : B

Explanation

The border-spacing specifies the width that should appear between table cells.

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

A - :border-bottom-width

B - :border-top-width

C - :border-left-width

D - :border-right-width

Answer : B

Explanation

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

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

A - :margin

B - :margin-bottom

C - :margin-top

D - :margin-left

Answer : C

Explanation

The margin-top specifies the top 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