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 the name of any element type?

A - The Type Selector

B - The Universal Selector

C - The Descendant Selector

D - The Class Selector

Answer : B

Explanation

The Universal Selector matches the name of any element type.

Q 2 - Which of the following defines a measurement relative to a font's x-height?

A - %

B - cm

C - em

D - ex

Answer : D

Explanation

ex − This value defines a measurement relative to a font's x-height. The x-height is determined by the height of the font's lowercase letter x.

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

A - px

B - vh

C - vw

D - vmin

Answer : B

Explanation

vh − 1% of viewport height.

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 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 visited hyperlinks?

A - :link

B - :visited

C - :hover

D - :active

Answer : B

Explanation

The :visited signifies unvisited hyperlinks.

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 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 the top margin of an element?

A - :margin

B - :margin-bottom

C - :margin-top

D - :margin-left

Answer : C

Explanation

The margin-top specifies the top 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