|
|||
|
|
|
|
|
Overview
|
|
Getting Started |
Open your x21h.htm file in an editor and save it as x21i.htm, and title the page, "Sarah Strong External Stylesheet Sampler" (changing Sarah Strong to your own name). |
|
Step 1: Creating an External Stylesheet
|
We can use the internal stylesheet we created in X21h, and convert it to an external stylesheet for use with more than one file. It's simple:
Check to make sure all your colors, fonts, and sizes are working. Your x21h.htm and x21i.htm should look just alike. If not, troubleshoot and debug. Validate your x21.css file using W3C's CSS validator (http://jigsaw.w3.org/css-validator/). Correct any problems if necessary, and print again. Similarly, validate your x21i.htm file as XHTML 1.0 Transitional using W3C's Validator (http://validator.w3.org/). |
| Step
2: Formatting a Second File
|
In this part, we'll use the Aesop's Fables text and format it using various styles.
Once again, check your file to make sure the formatting comes out as resquired. Troubleshoot and debug as needed. When you're satisfied, validate both your files:
|
|
Step 3: Changing the Original Stylesheet
|
An
example of what the pages should look like in a browser is available. This is
shown in Opera 7.54, reduced to 70% in full-screen mode in order to fit the entire
document on one screen, so yours will look bigger, longer, and narrower. However,
you should be able to see the colors, sizes, alignment, and overall formatting.
Link here to view: To see the effect of external stylesheets, make the following changes to x21.css:
Save the stylesheet and reload in the browser the two files that use it. Check each file to see what differences (if any) there are. |
| Submitting
the Assignment
|
When you're done, double-check that the assignment meets the specifications above, and that all links are functional. Upload your three files to your WCC student Website, and send email to the instructor with the URI of each one:
Be sure your email meets the formal requirements: name, class, section and exercise (x21i), and that it follows standard business-email practice. |
| |
|
|---|---|
|
Audience
|
This exercise is for people who have created internal style sheets (see module X21h) and are ready to begin applying external style sheets.
|
Objectives |
On successful completion of this module, you will be able to:
|
Module x21i: Formatting
with External Stylesheets |
This document is part of a modular instruction
series in Computer Instruction. For more information, see the overview
or the list of modules in this series, X: "XML,
XHTML, DHTML, CSS". This document has been used in the following
classes: INP 270.
|
History |
Original: 18 March 2003
Last modification: Monday, 31-Aug-2009 11:48:08 EDT |
Copyright |
Copyright © 2003, Laurence
J. Krieg, Washtenaw Community College
Instructors: You may point to this file in your Web-based materials; however, its location may change without notice. Students: You are welcome to make a copy for your personal use. All other uses: Please contact the author, Laurence J. Krieg, for permission: krieg@ieee.org. |