This tutorial introduces you to Cascading Style Sheets (CSS).
It guides you through the basic features of CSS with practical examples that you can try for yourself on your own computer. It is in two parts.
- Part I illustrates the standard features of CSS that work in Mozilla browsers and also in most other modern browsers.
- Part II contains some examples of special features that work in Mozilla but do not necessarily work in other environments.
The tutorial is based on the CSS 2.1 Specification.
Who should use this tutorial?
This tutorial is mostly for beginners in CSS, but you can also use it if you have some experience in CSS.
If you are a beginner in CSS, use Part I of this tutorial to understand CSS and learn how to use it. Then use Part II to understand the scope of CSS in Mozilla.
If you know some CSS, you can skip the parts of the tutorial that you already know, and only use the parts that interest you.
If you are experienced in CSS but not in Mozilla, you can skip to Part II.
What do you need before you start?
To get the most from this tutorial, you need an editor for text files and, especially for Part II, a Mozilla browser (Firefox, Camino or SeaMonkey). You must also know how to use them in basic ways.
If you do not want to edit files, then you can just read the tutorial and look at the pictures, but that is a less effective way for you to learn.
A few parts of the tutorial require other Mozilla software. Those parts are optional. If you do not want to download other Mozilla software, then you can skip them. The other Mozilla software referenced by this tutorial includes:
Note: CSS provides ways to work with color, so parts of this tutorial depend on color. You can only use these parts of the tutorial easily if you have a color display and normal color vision.
How to use this tutorial
To use this tutorial, read the pages carefully and in sequence. If you miss a page, then you might find it difficult to understand later pages.
On each page, use the Information section to understand how CSS works. Use the Action section to try using CSS on your own computer.
To test your understanding, take the challenge at the end of each page. Solutions the challenges are linked under the challenges, so you don't need to look at them if you don't want to.
To understand CSS in more depth, read the information that you find in boxes captioned More details. Use the links there to find reference information about CSS.
Tutorial Part I
A basic step-by-step guide to CSS.
Tutorial Part II
Examples that show the scope of CSS used with other web and Mozilla technologies.
CSS Getting Started Tutorial