Colors/Margins/Alignment/Indentation

October 1, 2009, Posted by admin at 10:47 am

Colors

This sets the type to a named color or RGB value:

{color: #33CC00}

or

{color: name}

The names are:

Black Maroon Green Olive
Navy Purple Teal Gray
Silver Red Lime Yellow
Blue Fuchsia Aqua White

hr1.gif (1127 bytes)

Margins

The margin-left, margin-right, and margin-top attributes
set the side margins and top-margin for a tag. You can specify the margins in pt, in, cm,
or px:

BODY {margin-left: 100px;

margin-right: 100px;

margin-top: 50px}

Or you can combine them into one attribute called margin.
Thus, instead of the above, you can use:

P {margin: 100px 100px 50px}

The order is top, right, and left. If you specify a single
value, it will be applied to all three margins.

hr1.gif (1127 bytes)

Alignment

The text-align attribute lets you left-justify, center, or
right-justify your HTML elements:

{text-align: left}

{text-align: center}

{text-align: right}

hr1.gif (1127 bytes)

Indentation

You can also set indentation pt, in, cm, or px:

H2 {text-indent: 20px}

This causes your <H2>’s to be indented 20 pixels.

No comment yet.

Leave a Reply