Browser Internet Explorer Netscape Opera Safari Firefox
Version 5.5 6.0 7.0 8.0 8.0 9.0 7.0 8.0 9.2 9.5 1.3 2.0 3.1 1.5 2.0 3.0
Supported Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
Short information
Default value Depends on arguments used
Inherited No
Applied To all elements
HTML analog <img border > | <table border>
Reference to specification
With the help of this parameter you can determine thickness, style and color at the top of an element. Values can be in any order and they are divided by a blank. A browser can define which of them corresponds to the necessary attribute.


border-top: border-width || border-style || color
The border-width determines border thickness. There are 8 values of the border-style which command borders types. They are given below.

The first two ones (dotted and dashed) are supported by Internet Explorer, version 5.5.
Argument color installs border color and the denotation may be in any valid format for CSS.


   DIV.line {
    border-top: 1px solid red; /* Line above the text */
    border-bottom: 1px solid red; /* Line below the text */
    padding: 5px; /* Areas around the text */
<div class="line">
   Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh
   euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis enim
   ad minim veniam, quis nostrud exerci tution ullamcorper suscipit lobortis nisl
   ut aliquip ex ea commodo consequat.</div>
The result of this example is shown on the figure 2

Object model