CSS Basics Quiz

Create an account and save your quiz results

Login and save your results

OR

Question 1/15

What property sets the space between elements in a flex container?

Select your answer

Question 2/15

How do you add a background color for all H1 elements?

Select your answer

Question 3/15

What CSS property is used to control the spacing between lines of text?

Select your answer

Question 4/15

Which property would you use in CSS to italicize text?

Select your answer

Question 5/15

To create space between the content of an element and its border, which property is used?

Select your answer

Question 6/15

Which CSS property is used to change the text size?

Select your answer

Question 7/15

Which CSS property is used to change the text color of an element?

Select your answer

Question 8/15

How do you give a border with rounded corners in CSS?

Select your answer

Question 9/15

Which of the following specifies an element that will appear in a new block formatting context?

Select your answer

Question 10/15

How do you make each word in a text start with a capital letter with CSS?

Select your answer

Question 11/15

What is the default display value of a DIV element?

Select your answer

Question 12/15

Which value of the 'position' property places an element at a specific position relative to its first positioned (not static) ancestor?

Select your answer

Question 13/15

How do you select elements with the class name 'button'?

Select your answer

Question 14/15

Which property is used to change the font of an element in CSS?

Select your answer

Question 15/15

What does CSS stand for?

Select your answer

Your Results

You did not answer any questions correctly.

Your Answers

Question 1/15
😊 Your answer was correct 🙁 Your answer was incorrect
What property sets the space between elements in a flex container?

Available answers

The 'gap' property in a flex container specifies the gap (space) between flex items.
Question 2/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you add a background color for all H1 elements?

Available answers

The 'background-color' property is used to set the background color for HTML elements. Here, it's applied to all H1 elements.

Question 3/15
😊 Your answer was correct 🙁 Your answer was incorrect
What CSS property is used to control the spacing between lines of text?

Available answers

The 'line-height' property in CSS determines the amount of space allocated to the height of a line of text.
Question 4/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which property would you use in CSS to italicize text?

Available answers

The 'font-style' property is used to set the style of the font, including the option to italicize text.
Question 5/15
😊 Your answer was correct 🙁 Your answer was incorrect
To create space between the content of an element and its border, which property is used?

Available answers

The 'padding' property is used to create space between an element's content and its border.
Question 6/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which CSS property is used to change the text size?

Available answers

The 'font-size' property sets the size of the text. It can be specified using pixels, ems, or percentages.
Question 7/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which CSS property is used to change the text color of an element?

Available answers

The 'color' property in CSS is used to set the color of the text of an element.
Question 8/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you give a border with rounded corners in CSS?

Available answers

The 'border-radius' property is used in CSS to create rounded corners for an element's border.
Question 9/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which of the following specifies an element that will appear in a new block formatting context?

Available answers

'display: flex;' initiates a new block formatting context, enabling the use of flexbox layout for children.
Question 10/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you make each word in a text start with a capital letter with CSS?

Available answers

The 'text-transform: capitalize;' property in CSS is used to make the first letter of each word capitalized.
Question 11/15
😊 Your answer was correct 🙁 Your answer was incorrect
What is the default display value of a DIV element?

Available answers

A DIV element is a block-level element, which means it has a default display value of 'block'.

Question 12/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which value of the 'position' property places an element at a specific position relative to its first positioned (not static) ancestor?

Available answers

An element with 'position: absolute;' is positioned relative to its first positioned ancestor, which is not static.
Question 13/15
😊 Your answer was correct 🙁 Your answer was incorrect
How do you select elements with the class name 'button'?

Available answers

In CSS, classes are selected with a dot (.) followed by the class name. So, '.button' selects all elements with class='button'.
Question 14/15
😊 Your answer was correct 🙁 Your answer was incorrect
Which property is used to change the font of an element in CSS?

Available answers

The 'font-family' property is used to specify the font of the text in an element, allowing you to list multiple fonts as fallbacks.
Question 15/15
😊 Your answer was correct 🙁 Your answer was incorrect
What does CSS stand for?

Available answers

CSS stands for Cascading Style Sheets, which is a style sheet language used for describing the presentation of a document written in HTML or XML.