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 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 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 a measurement in screen pixels?

A - px

B - vh

C - vw

D - vmin

Answer : A

Explanation

px − Defines a measurement in screen pixels.

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 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 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 of a table element allows browsers to speed up layout of a table by using the first width properties it comes across for the rest of a column rather than having to load the whole table before rendering it?

A - :table-layout

B - :border-spacing

C - :caption-side

D - :empty-cells

Answer : A

Explanation

The table-layout allows browsers to speed up layout of a table by using the first width properties it comes across for the rest of a column rather than having to load the whole table before rendering it.

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

A - :border-top-color

B - :border-left-color

C - :border-right-color

D - :border-bottom-color

Answer : A

Explanation

The border-top-color changes the color of top 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 property specifies the distance between a marker and the text in the list?

A - marker-offset

B - list-style-position

C - list-style-image

D - list-style

Answer : A

Explanation

The marker-offset specifies the distance between a marker and the text in the list.


css_questions_answers.htm

Advertisements