CSS border property tutorial

HTML
1
2
3
4
5
6
7
8
9
10
11
<div class="first">
This is the first box
</div>
<br/>
<div class="second">
This is the second box
</div>
<br/>
<div class="third">
This is the third box
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CSS
1
2
3
4
5
6
7
8
9
10
11
.first {
border: 2px solid black;
}
.second {
border: 2px dotted;
}
.third {
border: 1px dashed green;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Javascript
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The border property is specified as one or more of the <br-width>, <br-style>, and <color> values listed below. Values <br-width> Default value medium is used if absent. See border-width. <br-style> Default value none is used if absent. See border-style. <color> A <color> denoting the color of the border. If not set, its default value is the value of the element's color property (the text color, not the background color). See border-color.