CSS Quiz

1 / 25

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

2 / 25

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

3 / 25

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

4 / 25

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

5 / 25

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

6 / 25

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

7 / 25

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

8 / 25

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

9 / 25

What does `rem` stand for in CSS?

10 / 25

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

11 / 25

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

12 / 25

What is the purpose of the `transform` property?

13 / 25

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

14 / 25

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

15 / 25

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

16 / 25

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

17 / 25

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

18 / 25

Which of the following is the most specific selector?

19 / 25

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

20 / 25

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

21 / 25

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

22 / 25

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

23 / 25

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

24 / 25

What is the correct syntax for a CSS comment?

25 / 25

What does the 'box model' in CSS describe?

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!