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 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 2 - Which of the following is a way to associate styles with your HTML document?

A - External CSS - The Element

B - Imported CSS - @import Rule

C - Both of the above.

D - None of the above.

Answer : C

Explanation

Both of the above.

Answer : D

Explanation

All of the above options are correct.

Q 4 - Which of the following property is used to change the face of a font?

A - font-family

B - font-style

C - font-variant

D - font-weight

Answer : A

Explanation

The font-family property is used to change the face of a font.

Q 5 - Which of the following property is used to add or subtract space between the letters that make up a word?

A - color

B - direction

C - letter-spacing

D - word-spacing

Answer : C

Explanation

The letter-spacing property is used to add or subtract space between the letters that make up a word.

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

A - border

B - height

C - width

D - -moz-opacity

Answer : B

Explanation

The height property is used to set the height 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 style of bottom border?

A - :border-bottom-style

B - :border-top-style

C - :border-left-style

D - :border-right-style

Answer : A

Explanation

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

Q 9 - Which of the following property allows you to control the shape or appearance of the marker of a list?

A - list-style-type

B - list-style-position

C - list-style-image

D - list-style

Answer : A

Explanation

The list-style-type allows you to control the shape or appearance of the marker.

Q 10 - Which of the following property specifies the right padding of an element?

A - padding-bottom

B - padding-top

C - padding-left

D - padding-right

Answer : D

Explanation

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

css_questions_answers.htm
Advertisements