Notes on Cascading Style Sheets (CSS) |
![]() |
|
Home
| Class
resources | Course
Guide | Gordon
Websites | Domain
name | Forms
| Frames
| Graphics
| HTML
| Lesson
Plan | Miscellaneous
| Photos
| Promotion
| Webmaster's
Resources |
Servers - Selecting | Student sites | Tables | Textbook Exercise Sites | Uploading |
The Structure of a Rule (The Anatomy of a Style)*
Examples of rules (styles)
*The terms in parentheses are what Elizabeth Castro, the author of our textbook HTML for the World Wide Web, uses in discussing styles. The other terms not in parentheses are used by the WC3 and in the book Cascading Style Sheets, by Eric A. Meyer (published by O'Reilly). The above diagram is adapted from page 22 of Meyer's book. Typical global or embedded stylesheet with HTML document<HTML> --> </BODY> Typical Linked or External StylesheetSeveral HTML pages could be linked to a single style sheet saved as a text file with the .css suffix. Let's give this file the name styles3.css and save it in the same folder where the HTML files are that link to it. Here is a example of such a style sheet. This linked style sheet has the same styles as the global style sheet above, but it does not contain any of the HTML tags. BODY {font-size: large; font-family: Arial Black; font-weight:
normal; text-align: left; margin-left: 1in; margin-right: 1in;
color: Maroon; background: Aqua} To apply a .css stylesheet (styles3.css in the following example) to an HTML page, add a <link> tag to the HEADER: <HEAD> My examples of internal or embedded style sheets
My examples of external or linked style sheet
Examples of Cascading Style Sheets created by others
|
|
Home
| Class
resources | Course
Guide | Gordon
Websites | Domain
name | Forms
| Frames
| Graphics
| HTML
| Lesson
Plan | Miscellaneous
| Photos
| Promotion
| Webmaster's
Resources |
Servers - Selecting | Student sites | Tables | Textbook Exercise Sites | Uploading |
|
Graphic
credit: grant credit here
Last updated 2/16/01/ ©Copyright by Richard Edward Gordon. All rights reserved. For information contact Webmaster richard@gordonrichard.com |