Cascading Style Sheet (CSS) MCQs with answers Page - 4

Here, you will find a collection of MCQ questions on Cascading Style Sheet (CSS). Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 802.91K Points
Coach

Q. Which of the following is the correct syntax to make the background-color of all paragraph elements to yellow?

  • (A) p {background-color : yellow;}
  • (B) p {background-color : #yellow;}
  • (C) all {background-color : yellow;}
  • (D) all p {background-color : #yellow;}

A

Admin • 802.91K Points
Coach

Q. Which of the following is the correct syntax to display the hyperlinks without any underline?

  • (A) a {text-decoration : underline;
  • (B) a {decoration : no-underline;}
  • (C) a {text-decoration : none;}
  • (D) None of the above

A

Admin • 802.91K Points
Coach

Q. Which of the following property is used as the shorthand property for the padding properties?

  • (A) padding-left
  • (B) padding-right
  • (C) padding
  • (D) All of the above

A

Admin • 802.91K Points
Coach

Q. The CSS property used to make the text bold is -

  • (A) font-weight : bold
  • (B) weight: bold
  • (C) font: bold
  • (D) style: bold

A

Admin • 802.91K Points
Coach

Q. Which of the following property is used as the shorthand property of margin properties?

  • (A) margin-left
  • (B) margin-right
  • (C) margin
  • (D) None of the above

A

Admin • 802.91K Points
Coach

Q. The CSS property used to specify the transparency of an element is -

  • (A) opacity
  • (B) filter
  • (C) visibility
  • (D) overlay

A

Admin • 802.91K Points
Coach

Q. Which of the following is used to specify the subscript of text using CSS?

  • (A) vertical-align: sub
  • (B) vertical-align: super
  • (C) vertical-align: subscript
  • (D) None of the above

A

Admin • 802.91K Points
Coach

Q. Which of the following CSS property is used to specify the space between every letter inside an element?

  • (A) alpha-spacing
  • (B) character-spacing
  • (C) letter-spacing
  • (D) alphabet-spacing

A

Admin • 802.91K Points
Coach

Q. The CSS property used to specify whether the text is written in the horizontal or vertical direction?

  • (A) writing-mode
  • (B) text-indent
  • (C) word-break
  • (D) None of the above

A

Admin • 802.91K Points
Coach

Q. Which of the following syntax is correct in CSS to make each word of a sentence start with a capital letter?

  • (A) text-style : capital;
  • (B) transform : capitalize;
  • (C) text-transform : capital;
  • (D) text-transform : capitalize;

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ