CSS MCQs – Introduction to CSS Fundamentals

21.) Which CSS property is used to specify the thickness of the border?

A) border-width
B) border-thickness
C) border-size
D) thickness

Answer: Option A

Explanation: The border-width property is used to specify the thickness of the border in CSS.

22.) Which CSS property is used to set the font weight?

A) font-weight
B) weight
C) font-style
D) font-bold

Answer: Option A

Explanation: The font-weight property is used to set the font weight (boldness) of text in CSS.

23.) Which CSS property is used to specify the color of the text?

A) text-color
B) color
C) font-color
D) text-style

Answer: Option B

Explanation: The color property is used to specify the color of the text in CSS.

24.) Which CSS property is used to create a shadow effect for text?

A) text-shadow
B) shadow
C) box-shadow
D) text-effect

Answer: Option A

Explanation: The text-shadow property is used to create a shadow effect for text in CSS.

25.) Which of the following is not a valid CSS color value?

A) #FF0000
B) rgb(255, 0, 0)
C) red
D) 100% opacity

Answer: Option D

Explanation: 100% opacity is not a valid CSS color value. Opacity is set using the opacity property, not as a color value.

Leave a Reply

Your email address will not be published. Required fields are marked *