Make your own free website on


Syntax: border: <value>
Possible Values: <border-width> || <border-style> || <color>
Initial Value: Not defined
Applies to: All elements
Inherited: No

The border property is a shorthand for setting the width, style, and color of an element's border.


H3 { border: groove 1em }

A:link { border: solid green }

A:visited { border: thin dotted #000000 }

A:active { border: thick double blue }

See example in action

The border property can only set all four borders; only one border width and border style may be given. To give different values to an element's four borders, an author must use one or more of the border-top, border-right, border-bottom, border-left, border-color, border-width, border-style, border-top-width, border-right-width, border-bottom-width, or border-left-width properties.