The border property (CSS Reference)
Introduction
The border property can be used to set the width, style or
color of a HTML element. This can be useful to create border styles for
elements, which don’t have a border. However you can also use it with a table
border.
Example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>border Demonstration</title>
<style type="text/css">
p.border
{
border-left-width:3px;
border-left-color:black;
border-left-style:solid;
border-right-width:5px;
border-right-color:red;
border-right-style:double;
border-top-width:7px;
border-top-color:blue;
border-top-style:dashed;
border-bottom-width:9px;
border-bottom-color:green;
border-bottom-style:dotted;
}
</style>
</head>
<body>
<h2><p class="border">All borders
should be different.</p></h2
</body>
</html>
Output

Construction
|
Name:
|
Description:
|
|
border-color
|
The border-color is used to define the color of the
border.
|
|
border-style
|
The border-style is used to define the style of the
border. For example you could make your border to appear with dotted lines.
|
|
border-width
|
Specifies the width of the border for all four borders.
|
Please see the appropriate section for more information.
|