background:

background is a composite property for the background-color, background-image, background-attachment, background-position, and the background-repeat.

These values may be combined in any combination and any order.

Examples:

background: black;
background: #FFF url("myface.gif") fixed no-repeat center

[ CSS2 Definition of background ]


background-attachment:

The background-attachment property specifies whether the background image scrolls as the document scrolls or remains fixed in the window.

Defined values include scroll and fixed.

This can be set singularly with the background-attachment property, or as part of the composite background property.

Examples:

background-attachment: fixed;

[ CSS2 Definition of background-attachment ]


background-color:

The background-color property controls the color of the background, i.e. the color which appears "beneath" text and inline images. This property can be set in any legal color value format.

This can be set singularly with the background-color property, or as part of the composite background property.

Examples:

background-color: white;
background-color: #F0F;

[ CSS2 Definition of background-color ]


background-image:

The background-image property designates an image to be used as the background for the element.

It takes a url as its only value.
[ See also background-attachment, background-position, and background-repeat. ]

This can be set singularly with the background-image property, or as part of the composite background property.

Examples:

background-image: url("background.gif");

[ CSS2 Definition of background-image ]


background-position:

background-position sets the initial positioning of the background image.

background-position can take the form of an x or y coordinate, an x or y percentage, or as any one of the keywords top, bottom, left, right.

This can be set singularly with the background-position property, or as part of the composite background property.

Examples:

background-position: 0 0;    /*  default  */
background-position: 25% 48px;
background-position: center;

[ CSS2 Definition of background-position ]


background-repeat:

The background-repeat property specifies if and how a background image should be repeated within an element.

The default state is repeat. Alternately, the image can be designated to repeat only in the x-axis direction ('repeat-x'), only in the y-axis direction ('repeat-y'), or not to repeat at all ('no-repeat').

This can be set singularly with the background-repeat property, or as part of the composite background property.

Examples:

background-repeat: no-repeat;
background-repeat: repeat-y;

[ CSS2 Definition of background-repeat ]


border:

border is a composite CSS2 property which may contain style information for border-width, border-style, and the color of the border.

Examples:

border: double thick black;
border: solid thin #999;
border: inset white;

[ CSS2 Definition of border ]


border-style:

border-style describes the physical characteristics (that is, the rendered characteristics) of a CSS border.

Legal values include dashed, dotted, double, groove, inset, outset, ridge, solid, and none, which is default.

Examples:

border-style: double;
border-style: groove;

[ CSS2 Definition of border-style ]


border-width:

border-width is a specification for how wide the browser should render borders.

Legal values include thin, thick, and medium, which is the default for most user-agents.

Examples:

border-width: thin;

[ CSS2 Definition of border-width ]


color:

color in CSS2 can be defined as a color name (such as 'black'), a hexadecimal RGB in either 3-digit or 6-digit format, or as an RGB triple.

Common colors include black, white, red, blue, green, etc...
[ Some
color names, as defined in HTML 4.0 ]

RGB triples take the form rgb(red,green,blue), where each color value can be represented as either an absolute from 0-255 or as a brightness percentage from 0% to 100%.

Examples:

color: white;
color: #FFF;      /* These are all synonymous color values for white. */
color: #FFFFFF;
color: rgb(255,255,255);
color: rgb(100%,100%,100%);

[ CSS2 Definition of color ]


display:

The display property controls how a styled element is displayed.

Defined values for display include inline, list-item, and block (default). Each of these settings cause the element to behave in a predefined manner consistent the various baseline behaviors of the user-agent.

Alternately, the display property may be set to none, effectively removing the block from the document.

Examples:

display: list-item;
display: none;

[ CSS2 Definition of display ]


font-family:

font-family is a list of font names.

This can be a specific font name (such as 'Helvetica') or a generic font (such as 'sans-serif'), which will vary by user-agent.

Font names which contain spaces should be double-quoted, but most user-agents are forgiving in this regard.

Examples:

font-family: Courier;
font-family: monospace;
font-family: Arial, Helvetica, sans-serif;
font-family: Georgia, "Times Roman", serif;

[ CSS2 Definition of font-family ]


font-size:

font-size defines the size parameters for a styled font. This size can be specified in a relative fashion (such as 'larger'), in a generic fashion (such as 'x-large') or in an absolute fashion (such as '24px') using a variety of defined length units.

Examples:

font-size: 10pt;
font-size: 150%;
font-size: x-small;

[ CSS2 Definition of font-size ]


font-style:

font-style is a property which defines the style of a font. CSS2 defines available styles as normal, italic, or oblique. (Few browsers support oblique at this time.)

[ For bold fonts see font-weight. ]
[ For underlined text see text-decoration. ]

Examples:

font-style: italic;

[ CSS2 Definition of font-style ]


font-weight:

font-weight is a specification for the stroke size used to render a font.

font-weight can be defined as a generic value of 'normal' or 'bold', as a relative value of 'bolder' or 'lighter' or as an absolute number from 100 to 900, in increments of 100. 400 is equivalent to 'normal', and 700 is 'bold'. Most browsers do not support the full range of granularity from 100 to 900.

Examples:

font-weight: bold;
font-weight: 900;

[ CSS2 Definition of font-weight ]


length:

CSS2 provides a generous variety of length units available for specifying sizes.

Lengths can be specified in terms of pixels ('px'), points ('pt'), or picas ('pc'). (There are 72.27 points per inch, and 12 points in a pica.)

Lengths can also be specified in traditional units of measurement, including inches ('in'), millimeters ('mm'), and centimeters ('cm').

Furthermore, lengths can be specified in terms of 'em' or 'ex', referring to the overall font height and to the height of the letter "x", respectively. Using these units helps to maintain proportional spacing across varying size values.

Lastly, lengths can specified as a percentage ('%') of the current inherited size.

With few exceptions lengths can be positive or negative in value. (In these cases negative lengths will be ignored.) For lengths of zero no length unit is required.

Summary:

Valid length units:  cm, em, ex, in, mm, pc, pt, px, %

line-height:

line-height is the distance between text baselines in a block of text (also known as leading).

This can be specified as a length, as a number of line-breaks between baselines (such as '2' for double-spaced text), as a percentage of the current inherited size, or as the keyword 'normal'.

Examples:

line-height: normal;
line-height: 24px;
line-height: 200%;

[ CSS2 Definition of line-height ]


margin:

[ margin-top, margin-left, margin-bottom, margin-right ]

margin is a composite CSS2 property for the amount of whitespace surrounding an element. margin can be defined for the top, bottom, left, and right of an element, in any combination.

A margin specification with only one value sets all four positions. A margin specification with two values sets the top-bottom and left-right margins to their respective values. A margin specification with four values sets the top, left, bottom, and right margins respectively. Finally, a margin specification with three values sets the top, left-right, and bottom margins respectively.

Values for margins may be formed from any legal length units.

By definition, a margin is the region outside the element, and therefore margin has no other properties.

Alternately, individual margins can be specified explicitly with the properties margin-left, margin-right, margin-top, and margin-bottom.

Examples:

margin: 1in;
margin: 30px 10px 50px 20px;
margin-left: 2cm;
margin-top: 10%;

[ CSS2 Definition of margin ]


padding:

padding is a composite property which sets the amount of whitespace within the enclosed element. padding takes values for padding-top, padding-left, padding-bottom, and padding-right.

When padding has only one value, it is assumed to set all four properties identically. When padding has two values, it applies to the top-bottom and the left-right properties respectively. When padding is given three values they correspond to top, left-right, and bottom. And when all four values are set they should be ordered top, left, bottom, and right respectively.

The space added by padding is always rendered in the background color or image specified for the given element.

Examples:

padding: .5cm 1cm 1cm .75cm;
padding: 10%;
padding-left: 1in;

[ CSS2 Definition of padding ]


text-align:

text-align sets the alignment style for a block of text. Defined values include left, right, and center, as well as justify, which justifies both the left and right margins of text, adding horizontal padding between words as necessary.

Examples:

text-align: center;

[ CSS2 Definition of text-align ]


text-decoration:

The text-decoration property allows for the setting of various text characteristics like underline, blink, and strike-through text.

CSS2-defined values for text-decoration include: none (default), blink, line-through, overline, and underline.

Multiple values can be combined.

Example:

text-decoration: underline;
text-decoration: line-through blink;
text-decoration: none;

[ CSS2 Definition of text-decoration ]


text-indent:

text-indent sets the amount of indentation of the first line of a block of text.

text-indent can be specified in units of length or as a percentage of total line width. The default value is 0.

Examples:

text-indent: 4mm;
text-indent: 10%;

[ CSS2 Definition of text-indent ]


url:

Some style elements take a url as a value.

urls are specified by the keyword url, followed by a pair of parentheses containing a quoted URL. Either single- or double-quotes may be used in pairs. No spaces are permitted between the url keyword and the left parentheses.

urls may contain relative or absolute path names.
[ See also
background-image. ]

Examples:

background-image: url('my_image.gif');
list-style-image: url("http://www.homeslice.com/images/small_block.gif");

user-agent:

A user-agent is a piece of software which is used to render CSS-styled HTML for viewing. This is usually a web browser.

Examples:

Netscape Navigator 4
Microsoft Internet Explorer 3, 4