Friday, March 12, 2010

Cascading Style Sheets

This week’s installment is all about cascading style sheets, which you won’t see just by viewing the mini web sites (there are two, Lab 7 and Lab 9). But if you were to look at the HTML code behind each page, you would see only content. All of the formatting, except for the table structures, is done in a separate CSS file. For Lab 7, this meant designing one of the ten web pages (HTML file and CSS file), then simply referencing that CSS file to do all of the formatting on the other nine web pages, a considerable time saver. As I built the other nine pages, I came across a problem or two and a design tweak or two. To correct the problems and tweak the design, I made the change in the style sheet alone and the change was automatically applied to all pages.

Lab 7 is an attempt to build something similar to a commercial web site, with an emphasis on structural unity between pages and ease-of-use. The set of pages includes an introductory page, one about the company, one on contacts, one on service, and one for each product. Since I am not in a position to actually sell anything, the product line is a bit whimsical. In a future class I’ll learn how to connect a database to a web site which will remove the need for managing a fair amount of content on each HTML page.

No comments: