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 selector selects all paragraph elements whose lang attribute contains the word "fr"?

A - p[lang]

B - p[lang="fr"]

C - p[lang~="fr"]

D - p[lang|="fr"]

Answer : C

Explanation

p[lang~="fr"] − Selects all paragraph elements whose lang attribute contains the word "fr".

Q 3 - Which of the following uses 1vw or 1vh, whichever is smaller?

A - px

B - vh

C - vw

D - vmin

Answer : D

Explanation

vmin − 1vw or 1vh, whichever is smaller.

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 increase or decrease the size of a font?

A - font-size

B - font

C - font-variant

D - font-weight

Answer : A

Explanation

The font-size property is used to increase or decrease the size of a font.

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

A - :border-color

B - :border-style

C - :border-width

D - :border-bottom-color

Answer : A

Explanation

The border-color specifies the color of a border.

Q 8 - Which of the following property changes the color of right border?

A - :border-top-color

B - :border-left-color

C - :border-right-color

D - :border-bottom-color

Answer : C

Explanation

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

Q 9 - Which of the following property serves as shorthand for the marker properties?

A - list-style-type

B - list-style-position

C - list-style-image

D - list-style

Answer : D

Explanation

The list-style serves as shorthand for the marker properties.

Q 10 - Which of the following value of cursor shows it as crosshair or plus sign?

A - crosshair

B - default

C - pointer

D - move

Answer : A

Explanation

crosshair: A crosshair or plus sign.

css_questions_answers.htm
Advertisements