LESSON 42: CASCADING STYLE SHEET BASICS
- Study the index cards on Cascading Style Sheet Basics. 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 is the typical form of a style "rule"?
- What does the "selector" identify in a style rule?
- The definition of "declaration" given in the Weasel book is ever-so-slightly different than the definition
given in the web lesson 42. Discuss briefly the difference; use an example to illustrate.
- Consider this example:
P {font-size: 12 pt; color: red}
What is the selector?
- Consider this example:
P {font-size: 12 pt; color: red}
What are the properties?
- Consider this example:
P {font-size: 12 pt; color: red}
What are the values?
- Write efficient code to make all the following be colored red: headings level 1, headings level 2,
paragraphs
- Describe the effect of this code:
H1, H2, P {color: red}
- Describe the effect of this code:
LI EM {color: green}
- Describe the effect of this code:
EM LI {color: green}
- Does "LI EM" (no comma) mean the same thing as "LI, EM" (comma) for specifying selectors?
- Which is the contextual selector, "LI EM" or "LI, EM"?
- Write efficient code that makes bold text be colored red if it appears inside level-1 headings,
level-2 headings, or level-3 headings.
- Write the necessary header material that is needed to embed style information in a single HTML document.
- Do worksheet items (W42.1) through (W42.6) from the original lesson,
Cascading Style Sheet Basics. Show me that it works! (3 points each,
18 points total)
THE QUIZ OVER THIS LESSON WILL CONSIST OF:
- (10 pts) Questions from the index cards and reading (see below).
There will be 14 randomly-chosen questions; you will cross off 4 questions.
The remaining 10 questions are worth 1 point each.
- (25 pts total) CODING PART:
This will be modeled on worksheet items (W42.1) through (W42.6) form the original lesson.
In particular, you should know the shortcut for specifying info for more than one selector;
you should know how to code contextual selectors.
Prepare for the quiz over this section by practicing below.
Questions are asked in random order.
You can generate a printable quiz with solutions.