Getting started with CSS

  • Revision slug: CSS/Getting_Started
  • Revision title: Getting Started (CSS Tutorial)
  • Revision id: 306613
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

Aimed at complete beginners, this CSS tutorial introduces you to Cascading Style Sheets (CSS). It guides you through the basic features of the language with practical examples that you can try for yourself on your own computer and illustrates the standard features of CSS that work in modern browsers.

This tutorial is mostly for beginners in CSS, but you can also use it if you have some basic knowledge of CSS. If you are experienced in CSS this tutorial is probably not very useful to you, the CSS main page lists more advanced resources.

What do you need before you start?

To get the most from this tutorial, you need an editor for text files and a modern browser. 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.

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 II

A second part of the tutorial gives examples that show the scope of CSS used with other web and Mozilla technologies.

  1. JavaScript
  2. SVG graphics
  3. XML data
  4. XBL bindings
  5. XUL user interfaces

Revision Source

<p>Aimed at complete beginners, this <strong>CSS tutorial</strong> introduces you to <a href="/en-US/docs/CSS" title="/en-US/docs/CSS">Cascading Style Sheets</a> (CSS). It guides you through the basic features of the language with practical examples that you can try for yourself on your own computer and illustrates the standard features of CSS that work in modern browsers.</p>
<p>This tutorial is mostly for beginners in CSS, but you can also use it if you have some basic knowledge of CSS. If you are experienced in CSS this tutorial is probably not very useful to you, the CSS main page <a href="/en-US/docs/CSS" title="/en-US/docs/CSS">lists</a> more advanced resources.</p>
<nav class="fancyTOC">
  <a class="button" href="/en-US/docs/CSS/Getting_Started/What_is_CSS" title="en/CSS/Getting_Started/What_is_CSS">What is CSS</a>
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Why_use_CSS" title="en/CSS/Getting_Started/Why_use_CSS">Why use CSS</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/How_CSS_works" title="en/CSS/Getting_Started/How_CSS_works">How CSS works</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Cascading_and_inheritance" title="en/CSS/Getting_Started/Cascading_and_inheritance">Cascading and inheritance</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Selectors" title="en/CSS/Getting_Started/Selectors">Selectors</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Readable_CSS" title="en/CSS/Getting_Started/Readable_CSS">Readable CSS</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Text_styles" title="en/CSS/Getting_Started/Text_styles">Text styles</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Color" title="en/CSS/Getting_Started/Color">Color</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Content" title="en/CSS/Getting_Started/Content">Content</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Lists" title="en/CSS/Getting_Started/Lists">Lists</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Boxes" title="en/CSS/Getting_Started/Boxes">Boxes</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Layout" title="en/CSS/Getting_Started/Layout">Layout</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Tables" title="en/CSS/Getting_Started/Tables">Tables</a> 
  <a class="button" href="/en-US/docs/CSS/Getting_Started/Media" title="en/CSS/Getting_Started/Media">Media</a>
</nav>
<h3 id="What_do_you_need_before_you_start.3F">What do you need before you start?</h3>
<p>To get the most from this tutorial, you need an editor for text files and a modern browser. You must also know how to use them in basic ways.</p>
<p>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.</p>
<p><strong>Note:&nbsp;</strong> 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.</p>
<h3 id="How_to_use_this_tutorial">How to use this tutorial</h3>
<p>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.</p>
<p>On each page, use the <em>Information</em> section to understand how CSS works. Use the <em>Action</em> section to try using CSS on your own computer.</p>
<p>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.</p>
<p>To understand CSS in more depth, read the information that you find in boxes captioned <em>More details</em>. Use the links there to find reference information about CSS.</p>
<h2 id="Tutorial_Part_II">Tutorial Part II</h2>
<p>A second part of the tutorial gives examples that show the scope of CSS used with other web and Mozilla technologies.</p>
<ol>
  <li><strong><a href="/en/CSS/Getting_Started/JavaScript" title="en/CSS/Getting_Started/JavaScript">JavaScript</a></strong></li>
  <li><strong><a href="/en/CSS/Getting_Started/SVG_graphics" title="en/CSS/Getting_Started/SVG_graphics">SVG graphics</a></strong></li>
  <li><strong><a href="/en/CSS/Getting_Started/XML_data" title="en/CSS/Getting_Started/XML_data">XML data</a></strong></li>
  <li><strong><a href="/en/CSS/Getting_Started/XBL_bindings" title="en/CSS/Getting_Started/XBL_bindings">XBL bindings</a></strong></li>
  <li><strong><a href="/en/CSS/Getting_Started/XUL_user_interfaces" title="en/CSS/Getting_Started/XUL_user_interfaces">XUL user interfaces</a></strong></li>
</ol>
Revert to this revision