{Quality Online Education Since 2009}
 


CSS 3 Syntax

CSS rule is a combination of selectors and declarations.

Example:
p {    
    color:#06C;
    font-size:12px;
    font-family:Arial, Helvetica, sans-serif;
    text-align:justify;
}

Selector

In the style definition you should define how each selector work (font, color etc.).

Then, in the HTML code of web pages, you can refer to these selectors for activate, the styles.

There are three types of selectors are:

CSS Comments

Comments are used for explain your codes, it can be useful for edit the source code later. Comments are ignored by the browsers.

A CSS comment begins with /*, and ends with */, like this:

Example:
/*This is a comment*/

p {    
    color:#06C;
    font-size:12px;

    /*font-family:Arial, Helvetica, sans-serif;*/

    text-align:justify;
}


« Previous Chapter
CSS Introduction
Next Chapter »
CSS Positioning