|
Sections: Introduction | Section 1 | Section 2 | Section 3 |
Section Three: Part A | Part B | Part C | Part D | Part E |
The Power of External Style Sheets Stop and ThinkTo understand the powerful nature of external style sheets imagine that you are the web master for a 15-page web site. All 15 pages have a similar design to include similar background colors, similar font faces for headings and text, similar font colors for headings and text, etc. The site is visually appealing but you feel as though it could use a bit of a face lift. Think about how much work it would be to change all of the background colors, font colors, font faces, etc. for 15 pages. Sounds like a lot of work, right? It would be too if you had to do it by changing all the formatting attributes within each HTML document. However, it wouldn't be too difficult of a task if you were using external style sheets. Now, let's imagine that you created 15 HTML pages and one external style sheet that each HTML page accessed. Now, imagine that you listed all of the formatting changes for your web site in that one external style sheet. If you wanted to change a formatting aspect of the pages of your web site you would only need to change the external style sheet. Once the change or changes were made to the external style sheet, all the HTML documents that accessed that style sheet would be modified based on the changes made to the external style sheet. Pretty efficient, aye? How External Cascading Style Sheets WorkUp until now we have been creating CSS style rules and adding them directly to our HTML document. We placed the correctly formatted style rules between <style></style> tags that were listed in the <head></head> section of our document. With external CSS style rules we still create correctly formatted style rules we just don't place them inside our HTML document, instead we will place them in a separate .css file. |
© 2008 KCDL. All rights reserved. |