Introduction to Cascading Style Sheets

by Yukong Zhang

Version with Styles

Introduction

When you create a web page, you need to decide what to write on (contents) and what it would look like (styles). For a simple web page, we normallly mix both contents and styles together in a single page. However, a typical website consists of hundreds or thousands of web pages. It is desirable to make the web pages look consistently (similar styles). The "mix" approach would be a nightmare for web developers if the website needs to change its "look" regularly. A better approach is to separate styles from contents. Define styles in a separate file and apply it to multiple web pages.

Syntax of style sheets

  1. Selector
  2. A pair of curly braces
  3. Style name:value;
The best way to learn CSS is to test out and to see web pages look like with different styles.
Best reference: www.w3schools.com

Example

In the future robots will write computer code for humans. No programmers are needed.

Really? That is cool. Who write the code to program the robots?

2011 Class Schedule
Period Class Class Time Classroom
Period 1 Mrs. Moseley-English 1 9:30-10:35 McFadden Building rm.205
Period 2 Dr. Zhang-Computer Science 10:40-11:45 Science and Technology Building rm.111
Period 3 Ms. Manori-Physics/Chemistry 12:30-1:35 McFadden Building rm.212
Period 4 Mr. Vickery-Geometry 1:40-2:45 McFadden Building rm.101