CSS Quiz

The CSS practice quiz is designed to determine if you have basic understanding of Cascading Style Sheets. The quiz checks if you can apply CSS classes to HTML elements and if you understand how to apply properties to classes. After mastering CSS with this quiz, you can move on to using actual programming languages to manipulate your web pages.

1. What property do you use to create spacing between HTML elements?


2. For users that use the tab key to navigate websites, what property shows moving from one element to another using this behavior?


3. What is the property used to set the class’s text color?


4. The acronym CSS stands for what?


5. What property would you use to change the list style to show roman numerals instead of normal numbers?


6. What property would you use to create space between the element’s border and inner content?


7. In what way can you NOT reference CSS?


8. What property can you use to set the spacing in between lines of text?


9. What property do you use to set the background color of an image?


10. What is the worst way to style an element using CSS?


11. What property would you use to set an image instead of a standard bullet in a list?


12. How would you style an element so that the next element would appear right next to it not underneath it if both elements widths were collectively smaller than the container element?


13. If you want to make a cool footer that attaches to the bottom of the user’s window and not just the bottom of the page, what two properties would you use?


14. Which property is necessary to set an image in the background?


15. If you wanted to position an element to the right in its container, what is a valid CSS property to use?


16. How do you tell the browser you are creating a styling section with an internal style sheet?


17. How would you style table rows to have alternating background colors?


18. Some HTML elements have multiple states, like the link, how do you give it a particular style when the user hovers over the element?


19. What is the easiest way to reference a class of various HTML elements with a class of “special”?


20. If you wanted to put an HTML element at a certain position on the page regardless of the other elements, what value would you give the position property?


21. What property would you use to change the size of an HTML element’s border?


22. How do you set a particular style for a link that a user has already been to before arriving at your page?


23. How to set the style for a specific HTML element with an id of “special”?


24. How would you only create a border below an HTML element?


25. To reference a style sheet across multiple HTML pages, how would you define your CSS?


Question 1 of 25