Stylesheets: The Tool of the Web Design Gods
Amaze your friends! Squash your enemies!
- Each rule consists of what?
- Each rule consists of a selector and a declaration.
- In the example shown, what is the selector?
- H1 is the selector.
- What does the selector mean/do?
- The selector is the HTML tag that the style is attached to.
- What does the declaration mean/do?
- The declaration defines what the style actually is.
- 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.
- 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).
- 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.
- What are the 4 methods of adding styles to your page?
- Embed a stylesheet within the HTML document.
- Link to an external stylesheet from the HTML document.
- Import an external stylesheet into the HTML document.
- Add styles inline in the HTML document.
- When stylesheets are embedded, browsers honor them for how long?
- The Stylesheet is honored for the length of the HTML page.
- Why would one use an embedded sylesheet?
- It is useful when changing HTML pages individually.
- 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.
- What do the tags "<!-- and -->" mean?
- They prevent old web browsers that can't support style sheets from displaying the code itself.
Back
Next