oursolutionarchitectoursolutionarchitect
  • Selected Reading
  • Q&A

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 measurement in inches?

A - in

B - mm

C - pc

D - pt

Answer : A

Explanation

in − Defines a measurement in inches.

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 as a shorthand to specify a number of other background properties?

A - background-attachment

B - background

C - background-repeat

D - background-position

Answer : B

Explanation

The background property is used as a shorthand to specify a number of other background properties.

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 is used to set the opacity of an image?

A - border

B - height

C - width

D - -moz-opacity

Answer : D

Explanation

The -moz-opacity property is used to set the opacity of an image.

Q 7 - Which of the following property of a table element specifies whether the browser should control the appearance of the adjacent borders that touch each other or whether each cell should maintain its style?

A - :border-collapse

B - :border-spacing

C - :caption-side

D - :empty-cells

Answer : A

Explanation

The border-collapse specifies whether the browser should control the appearance of the adjacent borders that touch each other or whether each cell should maintain its style.

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

A - :margin-right

B - :margin-bottom

C - :margin-top

D - :margin-left

Answer : A

Explanation

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

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

A - padding-bottom

B - padding-top

C - padding-left

D - padding-right

Answer : B

Explanation

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

css_questions_answers.htm