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 2 - Which of the following selector selects all paragraph elements whose lang attribute contains the word "fr"?

A - p[lang]

B - p[lang="fr"]

C - p[lang~="fr"]

D - p[lang|="fr"]

Answer : C

Explanation

p[lang~="fr"] − Selects all paragraph elements whose lang attribute contains the word "fr".

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 set the background image of an element?

A - background-color

B - background-image

C - background-repeat

D - background-position

Answer : B

Explanation

The background-image property is used to set the background image of an element.

Q 5 - Which of the following property is used to set the text direction?

A - color

B - direction

C - letter-spacing

D - word-spacing

Answer : B

Explanation

The direction property is used to set the text direction.

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

A - border

B - height

C - width

D - -moz-opacity

Answer : A

Explanation

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

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 style of top border?

A - :border-bottom-style

B - :border-top-style

C - :border-left-style

D - :border-right-style

Answer : B

Explanation

The border-top-style changes the style of top 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 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