LESSON 41: INTRODUCTION TO CASCADING STYLE SHEETS
- Study the index cards on Introduction to Cascading Style Sheets. I've included a hard copy of these
index cards, for your convenience.
- Be sure that you can answer all the following questions, which are fair game for quizzes and
tests.
- What does "CSS" stand for?
- Fill in the blanks: Cascading Style Sheets give web designers more
over how pages are
.
They allow
to be applied to any web page or collection of web pages.
- What does "cascading" mean, in "Cascading Style Sheets"?
- In what year did the W3C first publish its recommendations for style sheets?
- What was the first browser to implement style sheets?
- Are style sheets a GOOD thing, or a BAD thing, for HTML purists who believe that style should be separate
from content and structure?
- List four major advantages of CSS (no explanations needed, just list the headings)
- List four typographical things that you can specify with style sheets:
- How is it that using CSS can make smaller HTML documents?
- Is it possible to link many different HTML pages to a single style sheet?
- What is the earliest version of Netscape Navigator that supports style sheets?
- Will CSS work properly without closing tags?
- What does the phrase "degrade gracefully" mean, in the context of applying CSS?
- List the three ways to apply style (no explanations needed; just list the headings)
- What is an "inline style" for CSS?
- Give an example of an "inline style" specification for CSS.
- Should CSS inline styles be used frequently? If not, when should they be used?
- Briefly describe how a CSS "embedded style sheet" works:
- What is the most efficient way to specify the style of a single document?
- What is the best way to specify the style for a collection of HTML documents?
- Which type of CSS style information gets inserted in the HEAD of an HTML document?
- Do worksheet items (W41.1) through (W41.4) from the original lesson,
Introduction to Cascading Style Sheets. Show me that it works! (10 points)
- Finish up the reading on frames, by reading pages 250 (from "Frame-Proof Your Site") to page 252.
Be sure that you can answer all the following questions, which are fair game for quizzes and
tests:
- Is it possible to prevent your site from being loaded into someone else's frame? (YES or NO)
- (JAVASCRIPT EXERCISE #1; 10 pts; frame-proof your site) Create a simple framed document, with just two columns. The left column should hold
left_col.htm
and the
right column should hold right_col.htm
. This will be called FRAMESET1.
Create another framed document, with two rows. The top row should hold top_row.htm
and the bottom row
should hold bottom_row.htm
. This will be called FRAMESET2.
Put a link in rightcol.htm
that links to FRAMESET2. Do the two rows get loaded into the right column?
Insert the appropriate JavaScript code to prevent FRAMESET2 from being loaded into another frame. Try it again.
Show me that it works!
- What does the phrase "preloading images" refer to?
- Can a frameset document be used to preload images? (YES or NO)
- Briefly describe the trick for using a frameset document to preload images.
- How does WebTV "support" frames?
- Is there a scrolling function in WebTV?
- Suppose you have an HTML document that ONLY MAKES SENSE in the context of its frameset. Is there a
way to prevent it from ever appearing out of this context?
- (JAVASCRIPT EXERCISE #2; 10 pts; keeping pages in their frames) Go back to JavaScript Exercise #1. Put a link in "top_row.htm" that
loads "left_col.htm". Does this frame load in the first row, out of the context of its frameset structure?
Now, insert appropriate JavaScript code in "left_col.htm" that will prevent it from ever being loaded outside
of its frameset structure. Try loading it again. What happens?
- Can all browsers (IE and NN) render frame structures specified in pixel measurements correctly? If not, comment.
- Jump to page 289 in the Weasel book, to start reading about Cascading Style Sheets. Read pages 289
to the top of page 293. Be sure that you can answer all the following questions, which are fair game for quizzes and
tests:
- Can style sheets use units like "points" and "ems," which are common in desktop publishing?
- Are style sheet functions built into popular web authoring tools, like Macromedia Dreamweaver and
Adobe GoLive?
- What remains the single drawback to implementing style sheets?
- Do all current browsers support style sheets?
- Do all current browsers support style sheets in the same way?
- What appendix in the Weasel book documents the way that different browsers handle CSS?
- In Appendix E, "CSS Support Chart," in the Weasel book, what does a checkmark mean?
- In Appendix E, "CSS Support Chart," in the Weasel book, what does a crossed-out checkmark mean?
- In Appendix E, "CSS Support Chart," in the Weasel book, what does a "P" mean?
- In Appendix E, "CSS Support Chart," in the Weasel book, what does a "B" mean?
- What does "buggy support" refer to, in Appendix E, "CSS Support Chart," in the Weasel book?
- In Appendix E, "CSS Support Chart," in the Weasel book, what does a "Q" mean?
- What does "quirky support" refer to, in Appendix E, "CSS Support Chart," in the Weasel book?
- Suppose you're designing a web page for an audience that is still using IE5 on Windows 95. Should you use the
"small-caps" property? Why or why not? (You may use the Weasel book!)
- Does IE3 for Macintosh support the "word-spacing" property? (You may use the Weasel book!)
- Give examples of two end tags that are commonly left off when coding HTML, but should NOT be left off
when using style sheets.
- What does the phrase "serve different styles to different browsers" mean, in the context of CSS?
- Should you be using the
>font>
in your current coding?
- Should you be using tables and frames as layout devices in your current coding?
- Does the O'Reilly series of computer books have a book that is dedicated to Cascading Style Sheets?
- Fill in the blanks: The key to working with style sheets is understanding how to
rules
and then
those rules to one or more
.
- What is the general structure of a style sheet rule?
- What is the "declaration" part of a style sheet rule?
- Write a style sheet rule that would make all first-level headings red.
- Consider this style sheet code:
H1 {color: red}
What is the selector?
- Consider this style sheet code:
H1 {color: red}
What is the property?
- Consider this style sheet code:
H1 {color: red}
What is the value?
- Consider this style sheet code:
H1 {color: red}
What is the declaration?
- What is the purpose of the "selector" in a style-sheet rule?
- What grammatical symbol is used between the property and value in a style-sheet rules?
- What is a "property" in a style-sheet rule?
- May a declaration contain more than one property/value pair?
- If you have more than one property/value pair in a declaration, then what grammatical symbol must
be used between them?
- Fill in the blank: In style sheet rules, VALUES are dependent on the
.
THE QUIZ OVER THIS LESSON WILL CONSIST OF:
- (40 pts) Questions from the index cards and reading (see below).
There will be 50 randomly-chosen questions; you will cross off 10 questions.
The remaining 40 questions are worth 1 point each.
- (15 pts total) CODING PART:
Be able to write simple style sheet information that is embedded in the HEAD of an HTML document.
For example, you should be able to make H1 tags colored green; or make bold text colored red.
Prepare for the quiz over this section by practicing below.
Questions are asked in random order.
You can generate a printable quiz with solutions.