Friday, 3 June 2011

Cascading Style Sheets: Basics of CSS

If you can't see this email, click here

About.com


Basics of CSS
Jennifer Kyrnin
From Jennifer Kyrnin, your Guide to Web Design / HTML
The basics of CSS - learn the basics of cascading style sheets including how to write your first style sheet.``
What is CSS?
CSS is an abbreviation for the term "Cascading Style Sheets". CSS was first developed in 1997 as a way to separate the way a Web page looked from the content and behavior. CSS defines how to display the content contained in markup and is stored in style sheets.

What is the Cascade
In CSS the cascade is like a waterfall, as the user agent encounters style rules it applies them one after the other. The order of styles is:
  1. browser defaults
  2. external style sheets
  3. internal style sheets
  4. inline styles
  5. the more specific style selector will take precedence
  • h2 is more specific than the universal selector
  • h2.class is more specific than h2
  • h2.id is more specific than h2.class

Separate Style from Structure
CSS was generated to separate the look and feel or style of Web pages from the XHTML markup or structure of the pages.

Three Types of CSS Styles
There are three ways you can add styles to your Web pages:
  • inline styles
  • embedded styles
  • external styles

How to Edit a Style Sheet:
CSS Editing Software: Which One is Right for You
Some people use a CSS style sheet editor.

Your First CSS Style Sheet
But it's easy to edit a style sheet using just a text editor.


This email is written by:
Jennifer Kyrnin
Web Design / HTML Guide
Email Me | My Blog | My Forum
 
Missing a lesson? Click here.

About U. is our collection of free online courses designed to help you learn a new skill, solve a problem, get something done, or just learn more about your world. Sign up now, and we will email you lessons on a daily or weekly basis.
You are receiving this email because you subscribed to the About.com 'Cascading Style Sheets' email. If you wish to unsubscribe, please click here.

About respects your privacy: Our Privacy Policy

Contact Information:
249 West 17th Street
New York, NY, 10011

© 2010 About.com
 

Advertisement

No comments:

Post a Comment