Cascading Style Sheets (CSS) is a way of separating the content of a web page from the way it is displayed. This is useful because it means that you can make site-wide changes with far less work; it also allows you to do far more with the look and feel of your site than you could otherwise. CSS is a style language that is created and revised by the World Wide Web Consortium.
You may remember that last time we learned basic HTML, and we went over things like the <font> tag and the <b> bold tag. These tags are now deprecated by the W3C, which has determined that it is best to use CSS for all such look-and-feel functions.
Exercises
Create a folder in your My Documents folder called "Website." Go to http://www.westland.net/coneyisland/. Click on the File menu in your browser, and choose to save the page as "Web Page, Complete" to the folder called "Website."
Now open the file "Coney Island History Web Site.htm" using Notepad. What I'd like you to do is find every paragraph that's centered with the <center&rt; element or the align="center" attribute and make them all left-aligned; also, find all the paragraphs that are currently left-aligned and center them. Be sure to refer to the W3Schools HTML tutorial if you need to.
Discuss your experience.
Go to http://csszengarden.com. Spend a couple of minutes applying different styles to the page at the CSS Zen Garden. Then download one of the styles to the folder called "Website." Whichever one you choose, it should show up as a file named "zengarden-sample.css."
Put this code between the <head> tags in the file "Coney Island History Web Site.htm":
On the CSS Zen Garden site, choose View --> Source in your browser menu and look at the way the HTML is written. How is it different from the HTML file you were working with?
Follow along with me as I go through HTML using the W3Schools CSS Tutorial. Refer back to this tutorial for further help.