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 all elements of a type?

A - The Type Selector

B - The Universal Selector

C - The Descendant Selector

D - The Class Selector

Answer : A

Explanation

The Type Selector selects all elements of a type.

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.

Answer : D

Explanation

All of the above options are correct.

Q 4 - Which of the following property is used to control the repetition of an image in the background?

A - background-color

B - background-image

C - background-repeat

D - background-position

Answer : C

Explanation

The background-repeat property is used to control the repetition of an image in the background.

Q 5 - Which of the following property is used to align the text of a document?

A - text-indent

B - text-align

C - text-decoration

D - text-transform

Answer : B

Explanation

The text-align property is used to align the text of a document.

Q 6 - Which of the following property of a anchor element signifies unvisited hyperlinks?

A - :link

B - :visited

C - :hover

D - :active

Answer : A

Explanation

The :link signifies unvisited hyperlinks.

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 left border?

A - :border-bottom-style

B - :border-top-style

C - :border-left-style

D - :border-right-style

Answer : C

Explanation

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

Q 9 - Which of the following property specifies whether a long point that wraps to a second line should align with the first line or start underneath the start of the marker of a list?

A - list-style-type

B - list-style-position

C - list-style-image

D - list-style

Answer : B

Explanation

The list-style-position specifies whether a long point that wraps to a second line should align with the first line or start underneath the start of the marker.

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

A - padding-bottom

B - padding-top

C - padding-left

D - padding-right

Answer : C

Explanation

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

css_questions_answers.htm
Advertisements