CSS is made up of three parts:
A selector, property and value.
selector {property: value}
The selector is usually the HTML tag you want to define, the property is the attribute you want to change, and every property can take a value. The property and value are separated by a colon, and surrounded by {and}:
body {color: #c0c0c0}
If the value has more than one word seperate them with commas.
body {color: #c0c0c0}
body,td,th {font-family: Verdana, Arial, Helvetica, sans-serif}
If you make more than one property separate them with a semi-colon ";"
body,td,thNotice how much easier to read it is if you don't put everything on one line! Also, notice how you can group several selectors by a comma "body,td,th"
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #666666;
}
You make the selector into a class. You can use this to make different sections of your page appear different by specifying the "class" start with a period such as .title
.titleOn your html page place the class like this <H4 class="title">stuff</H4>
{
padding-left:80px; font-size:24px; padding-top:25px
}
Keep your CSS clean and organized by placing comments that are not seen by anyone but you to divide different sections of your style sheet.
/* This is a comment */
CSS 101.2 <-- previous