CSS Quiz

Select the answers and click “Check Score”.

1) Which property is used to create space inside an element, between the content and the border?

2) What is the purpose of calc() in CSS?

3) What does CSS stand for?

4) How do you add a comment in CSS?

5) Which unit is relative to the root element’s font size?

6) Which CSS property is used to prevent an element from overflowing its container?

7) What is the correct syntax for importing a stylesheet in CSS?

8) How do you add a background color for all <h1> elements?

9) Which CSS property is used to make text bold?

10) How do you make an element's text uppercase using CSS?

11) What is the default value of box-sizing?

12) Padding shorthand: 10px top, 15px bottom, 5px right, 10px left?

13) How do you create a CSS animation that loops infinitely?

14) How do you apply a CSS rule to all <p> elements inside a <div>?

15) Which snippet is commonly used to center a website horizontally?

16) In a flex container, which property allows items to wrap to the next line?

17) Which is the correct CSS syntax?

18) What does the z-index property control?

19) How do you declare a CSS variable?

20) Which CSS property allows an element to align itself within a flex container?