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 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 selector selects all paragraph elements whose lang attribute contains values that are exactly "fr", or begin with "fr-"?

A - p[lang]

B - p[lang="fr"]

C - p[lang~="fr"]

D - p[lang|="fr"]

Answer : D

Explanation

p[lang|="fr"] − Selects all paragraph elements whose lang attribute contains values that are exactly "fr", or begin with "fr-".

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 control the position of an image in the background?

A - background-color

B - background-image

C - background-repeat

D - background-position

Answer : D

Explanation

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

Q 5 - Which of the following property is used to add or subtract space between the words of a sentence?

A - text-indent

B - text-align

C - text-decoration

D - text-transform

Answer : A

Explanation

The text-indent property is used to indent the text of a paragraph.

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

A - border

B - height

C - width

D - -moz-opacity

Answer : C

Explanation

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

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

A - :border-top-color

B - :border-left-color

C - :border-right-color

D - :border-bottom-color

Answer : B

Explanation

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

Q 9 - Which of the following property specifies the left margin of an element?

A - :margin

B - :margin-bottom

C - :margin-top

D - :margin-left

Answer : D

Explanation

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

Q 10 - Which of the following value of cursor shows it as an arrow?

A - crosshair

B - default

C - pointer

D - move

Answer : B

Explanation

default: An arrow


css_questions_answers.htm

Advertisements