The Slacker's Guide to HTML


[
advanced search]

Home
HTML
Basics
Text Tags and
Text Positioning
Images
Links
Forms
Tables
Frames
Adding Sound
Meta Tags
Horizontal Rules
Comment Tags
Tips & Tricks
HTML Tips
ASCII Codes
RGB Color Chart
Refreshing Pages
Viewing Source
CSS
Basics
Selectors
Properties
Values
Cursor Effects
Positioning Content
Measurement in CSS
Centering with CSS
Custom Form Buttons
CSS For Links
JavaScript
Script Archive
XHTML
Basics
Rules
Site Success Center
Site Promotion
Monetize Your Site
Extras
IE Vs. FireFox
Downloads
Myspace Comment




Values are the choices you make when you change the property of an element. If red value then color was a property. Let's assume that you are changing the color of text enclosed in paragraphs (the p tag) tags to be blue, OK? The CSS code would look like this:

p {color: blue}
In this example code above the property in point is color. Properties can be anything from border-width to vertical-align.

The value of the property (color, in this case) is blue. So, in that CSS example above, the entire line of code is a rule. A rule has two basic parts - a declaration and a selector. The selector is the HTML tag which will be affected by the rule. In this case the selector is the p tag. The declaration is the part of the rule that states just what is happening to what. The declaration consists of the previously-mentioned property and value, seperated by a colon (:).

Multiple declarations must be seperated by semicolons (;). Look at this example:
sub {color: fuschia; font-size: 12pt; font-variant: uppercase}
Notice the red semicolons.

Also, units of measurement are commonly used as values.

Read up on more CSS information if you want to expand your knowledge.