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 relative measurement for the height of a font in em spaces?

A - %

B - cm

C - em

D - ex

Answer : C

Explanation

em − A relative measurement for the height of a font in em spaces. Because an em unit is equivalent to the size of a given font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt.

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

A - in

B - mm

C - pc

D - pt

Answer : B

Explanation

mm − Defines a measurement in millimeters.

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 set the color of a text?

A - color

B - direction

C - letter-spacing

D - word-spacing

Answer : A

Explanation

The color property is used to set the color of a text.

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 specifies the width of a border?

A - :border-color

B - :border-style

C - :border-width

D - :border-bottom-color

Answer : C

Explanation

The border-width specifies the width of a 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 the bottom margin of an element?

A - :margin

B - :margin-bottom

C - :margin-top

D - :margin-left

Answer : B

Explanation

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

Q 10 - Which of the following value of cursor shows it as a pointing hand?

A - crosshair

B - default

C - pointer

D - move

Answer : C

Explanation

pointer: A pointing hand (in IE 4 this value is hand).


css_questions_answers.htm

Advertisements