12 CSS Questions for Testing Your Knowledge

How well do you know CSS? When was it created, who is the author and what these letters stand for? Do you ready to answer these questions? In October we proposed you to test your HTML knowledge. Now you can test your CSS knowledge by trying to answer 12 CSS questions in the post below.

If you’re looking for a job in web design or web development, you may be asked to take a similar test. Or even if you’re not working with web dev, then it could be useful just to find out how well you know other programming areas.

Simple questions

Question 1

Which of the following is not a valid value for the property border-style?

  • dotted
  • inset
  • glazed
  • groove
  • solid
Show Answer

Question 2

Which of the following is not a valid CSS length property?

  • cm
  • dm
  • em
  • mm
Show Answer

Question 3

What is the CSS selector that allows you to target every element in a web page?

Show Answer

Question 4

Which CSS property allows you to hide an element, but keep the space it occupies on the web page?

Show Answer

Question 5

There are 16 basic color keywords in CSS. Which one is not a basic color?

  • olive
  • fuchsia
  • cyan
  • aqua
  • maroon
Show Answer

Question 6

The font-style CSS property has four different valid values. Three of them are: inherit, normal and italic. What is the fourth valid value?

Show Answer

Question 7

Which of the following has a higher CSS specificity?

Selector 1:

#object h2::first-letter

Selector 2:

body .item div h2::first-letter:hover

Show Answer

Intermediate questions

Question 8

What is the correct order of the following pseudo-class selectors?

  • :active
  • :hover
  • :link
  • :visited
Show Answer

Question 9

Which of the following CSS properties does not influence the box model?

  • content
  • padding
  • margin
  • outline
  • border
Show Answer

Question 10

Which of the following media types is not valid for media queries?

  • tv
  • all
  • voice
  • print
  • braille
  • tty
  • embossed
Show Answer

Question 11

There are five generic font family values that can be assigned to the font-family property. Three of them are listed below. What are the other two?

  • serif
  • sans-serif
  • monospace
  • ?
  • ?
Show Answer

Question 12

What is the color keyword that will always be equal to the calculated value of a color for the selected element or elements?

Show Answer

So how good are you with CSS? How many questions did you answer correctly? Do you feel that you should learn more about CSS and its properties?