learn web technologies, the easy way

Style Sheets

CSS, or Cascading Style Sheets, is a kind of special language to help you take control of the style and layout of your website. This language is understood by all modern (and some not-so-modern) browsers.

To get started, let's look at an example where we have two simple HTML pages using a typical method of formatting content, which is embedding style (or formatting) information within the page. This will be followed a few more pages to illustrate the point about some of the advantages of CSS. I won't tell you why until after you've gotten a chance to look at the pages:

<html>
  <head>
    <title>Ugly Colors, Inc.</title>
  </head>
  <body bgcolor="white">
    <h1>Ugly Colors R Us - Home Page</>
    <font size="3" face="Verdana, Arial, Helvetica, sans-serif">
      Hello there, welcome to the home of ugly colors!
    </font>
  </body>
</html>
plain HTML listing 1

<html>
  <head>
    <title>Ugly Colors, Inc.</title>
  </head>
  <body bgcolor="white">
    <h1>Ugly Colors R Us - About Us</>
    <font size="3" face="Verdana, Arial, Helvetica, sans-serif">
      We are just a bunch of ugly color loving folks!
    </font>
  </body>
</html>
plain HTML listing 2