
Check what you remember about selectors, stylesheets, the box model, and CSS layout. Choose an option before revealing the answer. The original interactive test follows in Spanish.
CSS knowledge check
1. Which declaration removes an element from layout?
- display: none
- position: none
- clear: none
- float: none
Show the answer
display: none
2. Which property changes the layout behavior of an element and its contents?
- border
- display
- z-index
- padding
Show the answer
display
3. Which declaration hides an element while preserving its space?
- visibility: none;
- display: ocult;
- display: none;
- visibility: hidden;
Show the answer
visibility: hidden;
4. What is the clear property used for?
- Refresh the page.
- Remove the styles from a web page.
- Make elements float.
- Control whether an element moves below earlier floats.
Show the answer
Control whether an element moves below earlier floats.
5. Which property affects which element is painted in front of another?
- display
- position
- visible
- z-index
Show the answer
z-index
6. What is the easiest way to share the same styles across several HTML documents?
- An external stylesheet
- Inline CSS
- A style element in the head
- PHP
Show the answer
An external stylesheet
7. Which option is a CSS property?
- italic
- background-color
- span
- h1
Show the answer
background-color
8. Which option is a selector?
- p
- 50px
- font-family
- ed
Show the answer
p
9. Which rule sets a red background on every paragraph?
- p {background-color:red;}
- p.all {background-color:red;}
- .p {background-color:red;}
- #p {background-color:red;}
Show the answer
p {background-color:red;}
10. What is the space outside an element’s border called?
- margin
- border
- padding
Show the answer
margin
11. Which property sets the right margin?
- right-magin
- margin-right
- marginright
- text-right
Show the answer
margin-right
12. Which property changes the typeface?
- font-type
- font-family
- text-type
- text-family
Show the answer
font-family