Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

196 LESSON 8: Using CSS to Style a Site


Quiz



  1. Why can’t absolute units be used reliably in CSS?

  2. True or false: Including style sheets on your page requires features provided by a
    web server.

  3. Is the margin or padding of an element inside the border?


Quiz Answers



  1. Absolute units have problems in CSS because there’s no way to know exactly what
    sort of display medium the user has. An inch on one monitor might be completely
    different than an inch on another.

  2. The answer is false; you can use the tag to load external style sheets.

  3. The padding of an element is inside the border of an element, and the margin is
    outside.


Exercises



  1. If you’ve already created some web pages, go back and try to figure out how you
    could apply CSS to them.

  2. Examine the style sheets used by some websites that you admire. Take a look at
    how they use classes and IDs in their markup.

  3. Create a web page that includes a sidebar on the left, with text wrapped around it.
    Create a navigation menu at the bottom that is positioned below the sidebar.

Free download pdf