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 is a component of CSS style rule?

A - Selector

B - Property

C - Value

D - All of the above.

Answer : D

Explanation

All of the above options are correct.

Q 2 - Which of the following is a way to associate styles with your HTML document?

A - External CSS - The Element

B - Imported CSS - @import Rule

C - Both of the above.

D - None of the above.

Answer : C

Explanation

Both of the above.

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

A - font-size

B - font

C - font-variant

D - font-weight

Answer : B

Explanation

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

Q 6 - Which of the following property of a anchor element signifies unvisited hyperlinks?

A - :link

B - :visited

C - :hover

D - :active

Answer : A

Explanation

The :link signifies unvisited hyperlinks.

Q 7 - Which of the following property of a table element controls the placement of the table caption?

A - :border-collapse

B - :border-spacing

C - :caption-side

D - :empty-cells

Answer : C

Explanation

The caption-side captions are presented in the element. By default, these are rendered above the table in the document. You use the caption-side property to control the placement of the table caption.

Q 8 - Which of the following property changes the style of left border?

A - :border-bottom-style

B - :border-top-style

C - :border-left-style

D - :border-right-style

Answer : C

Explanation

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

Q 9 - Which of the following property specifies an image for the marker rather than a bullet point or number?

A - list-style-type

B - list-style-position

C - list-style-image

D - list-style

Answer : C

Explanation

The list-style-image specifies an image for the marker rather than a bullet point or number.

Q 10 - Which of the following property serves as shorthand for the padding properties?

A - padding

B - padding-top

C - padding-left

D - padding-right

Answer : A

Explanation

The padding serves as shorthand for the preceding properties.


css_questions_answers.htm

Advertisements