Web Development
Using PHP

Follow on
Twitter

CSS

Introduction to CSS

Wednesday - Class 03

CSS Worksheet

Most of the answers for this worksheet may be found at the w3schools.com website: http://w3schools.com/css/

CSS Basic

  1. What does CSS stand for?
  2. What is the advantage of using CSS?
  3. Write an example CSS rule and label the selector, declaration, property and value.
  4. How are comments done in a CSS sheet?
  5. Conceptually, what is the difference between an id selector and a class selector?
  6. Give examples of: HTML Element selector, id selector, and a class selector.
  7. What are the three ways to use CSS in a document?
  8. If multiple styles are specified for an html element, in what order are evaluated? (Later ones being higher priority.)
  9. Write the CSS code to set the background color for an entire document to white:
  10. Give an example of setting properties for the background by using the shorthand property:
  11. Show how to set the color of text in h1 headings to red:
  12. Show how to center-align the text in a paragraph:
  13. Show how to indent the first line of a paragraph by 50 pixels:
  14. What is the difference between a serif font, and a sans-serif font?
  15. Give two examples of font families:
  16. What is different about a monospace font?
  17. Show how to set the font size for a paragraph to 12 pixels.
  18. What is the difference between setting the font size via pixels or via em?
  19. Show 1 of the 4 lines required to remove underlines from hyperlinks:
  20. Show how to set the vertical alignment of text in a table cell so that it is at the top.
  21. Sketch out the CSS box model, showing content, padding, border, and margin:
  22. Show how to put a 2 pixel solid border around a paragraph:
  23. Show how to put a 25 pixel margin below h1.
  24. Using grouping, show how to set the text color of h1, h2, and h3 to red.
  25. Show how to set the width of a paragraph to 800 pixels.
  26. What is the difference between a hidden element, and an element that is not displayed?
  27. What is the difference between a block element, and an in-line element?
  28. What is the difference between static, fixed, relative, and absolute positioning?
  29. What is does CSS float do?
  30. Give an example of a CSS pseudo-class:

Color Theory

Practice Applying CSS

You are not logged in. Log in here and track your progress.