Test your knowledge of basic CSS3 concepts with this quiz. Ten questions cover fundamental aspects of Cascading Style Sheets, including selectors, properties, and layout.
-
Question of
What does CSS stand for?
-
Stylesheet for Content
-
Cascading Style Sheet
-
Computer Style Sheet
-
Creative Style Sheet
Correct Wrong
Explanation: CSS stands for Cascading Style Sheets. It is a style sheet language used for describing the look and formatting of a document written in HTML.
-
-
Question of
Which property is used to change the text color in CSS?
-
text-style
-
color
-
font-color
-
text-color
Correct Wrong
Explanation: The color property is used to set the text color in CSS.
-
-
Question of
How can you select an element with id “example” in CSS?
-
#example
-
.example
-
element.example
-
id:example
Correct Wrong
Explanation: To select an element with a specific ID, you use the # symbol followed by the ID name (e.g., #example).
-
-
Question of
What is the purpose of the “box-sizing” property in CSS?
-
Sets the size of the box
-
Specifies the type of box
-
Adjusts the box model
-
Defines the color of the box
Correct Wrong
Explanation: The box-sizing property is used to control the box model for an element, determining how the width and height of an element are calculated.
-
-
Question of
Which CSS property is used for controlling the layout flow of the elements?
-
display
-
position
-
float
-
align
Correct Wrong
Explanation: The display property is used to control the layout behavior of an element.
-
-
Question of
How can you apply a background color to an element in CSS?
-
bg-color
-
background-color
-
color-background
-
set-background
Correct Wrong
Explanation: The background-color property is used to set the background color of an element in CSS.
-
-
Question of
What is the purpose of the “margin” property in CSS?
-
Sets the outer spacing of an element
-
Adjusts the inner spacing of an element
-
Defines the border of an element
-
Specifies the padding of an element
Correct Wrong
Explanation: The margin property is used to control the outer spacing of an element.
-
-
Question of
How can you include multiple CSS stylesheets in one HTML document?
-
Using the ‘style’ tag
-
Using the ‘link’ tag
-
Using the ‘css’ tag
-
Using the ‘script’ tag
Correct Wrong
Explanation: Multiple stylesheets can be included in an HTML document using the tag in the 'head' section.
-
-
Question of
Which CSS property is used for adding shadows to text?
-
shadow
-
text-shadow
-
font-shadow
-
box-shadow
Correct Wrong
Explanation: The text-shadow property is used to add shadows to text in CSS.
-
-
Question of
What is the purpose of the “z-index” property in CSS?
-
Sets the background color
-
Controls the stacking order of elements
-
Adjusts the size of the element
-
Specifies the font size
Correct Wrong
-