CSS stands for \"Cascading Style Sheets\", it is used to define how HTML elements are to be displayed on screen, paper, or in other media. It can control the layout of multiple web pages all at once.

CSS MCQs: This section contains Cascading Style Sheets (CSS) Multiple-Choice Questions with Answers. These CSS MCQs are written for beginners as well as advanced, practice these MCQs to enhance and test the knowledge of CSS.

 

questions

Title
What is CSS stands for?

What is CSS stands for?


  1. Cascading Style Sheets
  2. Cascade Style Sheet
  3. Color Style Sheets
  4. Color Style Sheet
discuss
What CSS describes?

What CSS describes?


  1. CSS describes how calculation perform on button click.
  2. CSS describes how HTML elements are to be displayed on screen, paper, or in other media
  3. Both A. and B.
  4. None of the above
discuss
What is the correct syntax for referring an external CSS?

What is the correct syntax for referring an external CSS?


  1. <link rel="stylesheet" type="text/css" href="mystyle.css">
  2. <stylesheet rel="stylesheet" type="text/css" href="mystyle.css">
  3. <style rel="stylesheet" type="text/css" href="mystyle.css">
  4. All of the above
discuss
What is a CSS selector?

What is a CSS selector?


  1. A CSS selector is the CSS class name.
  2. A CSS selector is the set of properties that are going to be applied on HTML elements
  3. A CSS selector is name of CSS file.
  4. A CSS selector is the first part of a CSS Rule. It may an HTML element or pattern of elements.
discuss
In a CSS file, there is a CSS rule for paragraphs tags – what does p can be called?

In a CSS file, there is a CSS rule for paragraphs tags – what does p can be called?


  1. Selector
  2. Attribute
  3. Property
  4. Tag
discuss
Internal styles are written within the _____ element

Internal styles are written within the _____ element.


  1. <style>…</style>
  2. <css>…</css>
  3. <stylesheet>…</stylesheet>
  4. Both A. and B.
discuss
Inline styles are written within the _____ attribute

Inline styles are written within the _____ attribute.


  1. style
  2. css
  3. stylesheet
  4. Both A. and B.
discuss
CSS comments are placed within the ______

CSS comments are placed within the ______.


  1. //
  2. /* and */
  3. <* and *>
  4. <! And !>
discuss
Can comments also span multiple lines?

Can comments also span multiple lines?


  1. Yes
  2. No
discuss
Which property is used to define the text color?

Which property is used to define the text color?


  1. text-color
  2. color
  3. font-color
  4. Both A. and B.
discuss
Which property is used to define the background color?

Which property is used to define the background color?


  1. bgcolor
  2. bg-color
  3. background
  4. background-color
discuss
From the given options which is/are the valid way to represent a color?

From the given options which is/are the valid way to represent a color?


  1. A valid color name like "blue"
  2. HEX code like "#0000ff"
  3. RGB Value like "rgb(0,0,255)
  4. All of the above
discuss
Which property is used to define the font of the element's text?

Which property is used to define the font of the element's text?


  1. font
  2. font-family
  3. font-style
  4. All of the above
discuss
To make a text italic, which CSS property is used?

To make a text italic, which CSS property is used?


  1. font
  2. font-family
  3. font-style
  4. All of the above
discuss
What are the valid values of font-style property?

What are the valid values of font-style property?


  1. italic, bold, bolder
  2. normal, bold, italic
  3. underline, bold, italic
  4. inherit, italic, normal, oblique
discuss
Why font-weight property is used?

Why font-weight property is used?


  1. Sets how thick or thin characters in text should be displayed.
  2. Sets the size of the font
  3. Both A. and B.
  4. None of the above
discuss
What is/are the correct value(s) of font-weight property?

What is/are the correct value(s) of font-weight property?


  1. bold, italic, underline
  2. normal, bold, italic
  3. normal, bold, bolder, lighter, initial, and inherit
  4. None of the above
discuss
Which is the correct inline CSS for p tag to define paragraph's text and background colors?

Which is the correct inline CSS for p tag to define paragraph's text and background colors?


  1. <p css="color: red; background-color: yellow;">
  2. <p cssstyle="color: red; background-color: yellow;">
  3. <p inline="color: red; background-color: yellow;">
  4. <p style="color: red; background-color: yellow;">
discuss
What is the correct syntax of border property in CSS?

What is the correct syntax of border property in CSS?


  1. border: border-width border-style border-color
  2. border: border-color border-width border-style
  3. border: border-style border-width border-color
  4. All of the above
discuss
Which of the following is the correct syntax to display the hyperlinks without any underline?

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


  1. a {text-decoration : underline;}
  2. a {text-decoration : none;}
  3. a {text-decoration : block;}
  4. None of the above
discuss
total MCQs: 90

MCQs

90

Views

112

Best Answers

299

Points

5