CSS Quiz

1 / 25

What is the correct way to add a transition to a property with a duration of 0.5 seconds?

2 / 25

Which CSS selector is used to select all `<p>` elements with a class of 'intro'?

3 / 25

Which CSS property is used to control the spacing between letters in a text?

4 / 25

What is the purpose of the `z-index` property?

5 / 25

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

6 / 25

Which of the following is a key feature of CSS Grid Layout?

7 / 25

Which of the following properties is used to create a flex container?

8 / 25

What is the purpose of the `transform` property?

9 / 25

How can you make a `<div>` element span two columns in a CSS Grid layout?

10 / 25

What is the correct syntax for a CSS comment?

11 / 25

Which CSS property is used to specify the flexibility of an item in a flex container?

12 / 25

Which value of the `position` property will position an element relative to the nearest positioned ancestor?

13 / 25

What does the 'box model' in CSS describe?

14 / 25

Which of the following properties is used to create a multi-column layout similar to a newspaper?

15 / 25

What does `rem` stand for in CSS?

16 / 25

What is the correct way to link an external stylesheet named 'styles.css' to an HTML document?

17 / 25

What is the purpose of the `calc()` function in CSS?

18 / 25

How do you apply a CSS style to every single `<p>` element on a page?

19 / 25

What is the purpose of the `!important` rule in CSS?

20 / 25

What is the correct syntax for a media query that applies styles to screens smaller than 600px?

21 / 25

Which of the following values for the `display` property will make an element invisible and remove it from the document flow?

22 / 25

What is the difference between `margin` and `padding`?

23 / 25

Which of the following is an example of a pseudo-class?

24 / 25

Which of the following is the most specific selector?

25 / 25

How can you specify a different style for an `<a href="#">` element that the user is currently hovering over?

Your score is



Overview:

Think you know CSS? Try our CSS Quiz to challenge yourself with questions on selectors, layouts, colors, and responsive design. Great for web design learners and developers who want to improve their front-end skills!