Stylesheets: The Tool of the Web Design Gods

Amaze your friends! Squash your enemies!

  1. Each rule consists of what?
    Each rule consists of a selector and a declaration.
  2. In the example shown, what is the selector?
    H1 is the selector.
  3. What does the selector mean/do?
    The selector is the HTML tag that the style is attached to.
  4. What does the declaration mean/do?
    The declaration defines what the style actually is.
  5. Name the 2 parts that make up the declaration and give an example of each.
    The declaration is made up of a property and a value. In the example, the value was green, and the property was color.
  6. Explain how and why one would group selectors together.
    Selectors can be grouped by listing them and separating them by commas before typing in the declaration(s).
  7. What does it mean when it says that rules are inherited from "parent" to "child"?
    If a HTML command is in another HTML command and the outer one has a set attribute, the inner one will also have that attribute unless another rule is set for the one on the inside.
  8. What are the 4 methods of adding styles to your page?
    1. Embed a stylesheet within the HTML document.
    2. Link to an external stylesheet from the HTML document.
    3. Import an external stylesheet into the HTML document.
    4. Add styles inline in the HTML document.
  9. When stylesheets are embedded, browsers honor them for how long?
    The Stylesheet is honored for the length of the HTML page.
  10. Why would one use an embedded sylesheet?
    It is useful when changing HTML pages individually.
  11. What is the purpose of using the TYPE="text/css" attribute?
    It specifies the MIME type so browsers that don't support CSS can ignore stylesheet code altogether.
  12. What do the tags "<!-- and -->" mean?
    They prevent old web browsers that can't support style sheets from displaying the code itself.
Back
Next
Hosted by www.Geocities.ws

1 1