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.
Title | |
---|---|
What is CSS stands for?What is CSS stands for?
The answer is:
A. Cascading Style Sheets
|
|
What CSS describes?What CSS describes?
The answer is:
B. CSS describes how HTML elements are to be displayed on screen, paper, or in other media
|
|
What is the correct syntax for referring an external CSS?What is the correct syntax for referring an external CSS?
The answer is:
A. <link rel="stylesheet" type="text/css" href="mystyle.css">
|
|
What is a CSS selector?What is a CSS selector?
The answer is:
D. A CSS selector is the first part of a CSS Rule. It may an HTML element or pattern of elements.
|
|
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?
The answer is:
A. Selector
|
|
Internal styles are written within the _____ elementInternal styles are written within the _____ element.
The answer is:
A. <style>…</style>
|
|
Inline styles are written within the _____ attributeInline styles are written within the _____ attribute.
The answer is:
A. style
|
|
CSS comments are placed within the ______CSS comments are placed within the ______.
The answer is:
B. /* and */
|
|
Can comments also span multiple lines? |
|
Which property is used to define the text color?Which property is used to define the text color?
The answer is:
B. color
|
|
Which property is used to define the background color?Which property is used to define the background color?
The answer is:
D. background-color
|
|
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?
The answer is:
D. All of the above
|
|
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?
The answer is:
B. font-family
|
|
To make a text italic, which CSS property is used?To make a text italic, which CSS property is used?
The answer is:
C. font-style
|
|
What are the valid values of font-style property?What are the valid values of font-style property?
The answer is:
D. inherit, italic, normal, oblique
|
|
Why font-weight property is used?Why font-weight property is used?
The answer is:
A. Sets how thick or thin characters in text should be displayed.
|
|
What is/are the correct value(s) of font-weight property?What is/are the correct value(s) of font-weight property?
The answer is:
C. normal, bold, bolder, lighter, initial, and inherit
|
|
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?
The answer is:
D. <p style="color: red; background-color: yellow;">
|
|
What is the correct syntax of border property in CSS?What is the correct syntax of border property in CSS?
The answer is:
A. border: border-width border-style border-color
|
|
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?
The answer is:
B. a {text-decoration : none;}
|
MCQs
Views
Best Answers
Points