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 class attribute?

A - The Type Selector

B - The Universal Selector

C - The Descendant Selector

D - The Class Selector

Answer : D

Explanation

The Class Selector matches a element based on its class attribute.

Q 2 - Which of the following defines a measurement in inches?

A - in

B - mm

C - pc

D - pt

Answer : A

Explanation

in − Defines a measurement in inches.

Q 3 - Which of the following defines 1% of viewport width?

A - px

B - vh

C - vw

D - vmin

Answer : C

Explanation

vw − 1% of viewport width.

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 add or subtract space between the words of a sentence?

A - color

B - direction

C - letter-spacing

D - word-spacing

Answer : D

Explanation

The word-spacing property is used to add or subtract space between the words of a sentence.

Q 6 - Which of the following property is used to control the flow and formatting of text?

A - white-space

B - text-shadow

C - text-decoration

D - text-transform

Answer : A

Explanation

The white-space property is used to control the flow and formatting of 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 width of bottom border?

A - :border-bottom-width

B - :border-top-width

C - :border-left-width

D - :border-right-width

Answer : A

Explanation

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

Q 9 - Which of the following property changes the width of right border?

A - :border-bottom-width

B - :border-top-width

C - :border-left-width

D - :border-right-width

Answer : D

Explanation

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

Q 10 - Which of the following value of cursor shows it as the 'I' bar?

A - crosshair

B - default

C - pointer

D - move

Answer : D

Explanation

move: The 'I' bar

css_questions_answers.htm
Advertisements