CSCI 102T
The Socio-Techno Web
Home | Schedule | Labs | CS@Williams
Lab 4: Cascading Style Sheets
Warmup Exercise
Before getting started with CSS, spend a few minutes fixing any existing formatting problems in your webpage. One way to test for errors on your own is to try the HTML validator on your webpage. Be warned that some errors and warnings will appear cryptic. Your instructor can help you with this. Don't get bogged down fixing too many issues related to formatting (i.e., things like font size, color, etc) since you are going to migrate all of these details into your CSS file this week anyway.
Background Info: Understanding CSS
As we have seen before with HTML, the Web is a great resource for learning more about CSS. Start by skimming Chapter 2 of the book Cascading Style Sheets, designing for the Web, by HÃ¥kon Wium Lie and Bert Bos. Additional information about CSS can also be found here and here. Take some time to read over these carefully. There is also a short YouTube video that may be helpful after you've done these readings. (Please don't watch this in lab unless you have headphones.)
CSS Tutorial
To gain a better understanding of CSS, work through this CSS tutorial. Note that you can use TextWrangler as your text editor instead of TextEdit as the tutorial suggests. After completing the tutorial, update your webpage to use an external CSS file for all formatting. You should be able to use the CSS file created in the above tutorial as a template for your own custom CSS file.
Tasks for lab