< Back
Page 9 of 9
This chapter is from the book
Workshop
The workshop contains quiz questions and exercises to help you solidify your understanding of the material covered. Try to answer all questions before looking at the “Answers” section that follows.
Quiz
- What code would you use to create a style sheet to specify 30-point blue Arial headings and all other text in double-spaced, 10-point blue Times Roman (or the default browser font)?
- If you saved the style sheet you made for Question 1 as corporate.css, how would you apply it to a web page named intro.html?
- How many different ways are there to ensure style rules can be applied to your content?
Answers
Your style sheet would include the following:
h1 { font: 30pt blue Arial; } body { font: 10pt blue; }
Put the following tag between the <head> and </head> tags of the intro.html document:
<link rel="stylesheet" type="text/css" href="corporate.css" />
- Three: externally, internally, and inline.
Exercises
- Using the style sheet you created earlier in this chapter, add some style classes to your style sheet. To see the fruits of your labor, apply those classes to the HTML page you created as well. Use classes with your <h1> and <p> tags to get the feel for things.
- Develop a standard style sheet for your website and link it into all your pages. (Use internal style sheets and/or inline styles for pages that need to deviate from it.) If you work for a corporation, chances are it has already developed font and style specifications for printed materials. Get a copy of those specifications and follow them for company web pages, too.
- Be sure to explore the official style sheet specs at http://www.w3.org/Style/CSS/ and try some of the more esoteric style properties not covered in this chapter.
< Back
Page 9 of 9