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 defines a relative measurement for the height of a font in em spaces?

A - %

B - cm

C - em

D - ex

Answer : C

Explanation

em − A relative measurement for the height of a font in em spaces. Because an em unit is equivalent to the size of a given font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt.

Q 3 - Which of the following defines a measurement in points?

A - in

B - mm

C - pc

D - pt

Answer : D

Explanation

pt − Defines a measurement in points. A point is defined as 1/72nd of an inch.

Q 4 - Which of the following property is used to set the background image of an element?

A - background-color

B - background-image

C - background-repeat

D - background-position

Answer : B

Explanation

The background-image property is used to set the background image of an element.

Q 5 - Which of the following property is used to increase or decrease how bold or light a font appears?

A - font-family

B - font-style

C - font-variant

D - font-weight

Answer : D

Explanation

The font-weight property is used to increase or decrease how bold or light a font appears.

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

A - border

B - height

C - width

D - -moz-opacity

Answer : A

Explanation

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

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 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 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