Know Your CSS
Test your knowledge of Cascading Style Sheets
with this simple quiz.
1. Which of the following units of measurement is a relative value?
A - millimeters
B - inches
C - centimeters
D - pixels
E - points
2. Match each colour panel with the section of code that defines it.
aqua
rgb(54%, 77%, 0%)
rgb(84, 0, 199)
#f34
#fff71a
3. The URL of a background image for a CSS element needs to be relative to the XHTML file. True or false?
A - true
B - false
4. Which side of the following element will have the widest padding?
.box {padding: 5px 10px 0 20px;}
A - left
B - right
C - top
D - bottom
E - all sides the same
5. Which of the following values, when applied to the position property of an element, will stop it moving when the browser window is scrolled?
A - static
B - relative
C - absolute
D - fixed
E - inherit
Answers