O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

border-top-color

Values:

<color>

Initial value:

The value of color for the element

Applies to:

All elements

Inherited:

No

Computed value:

If no value is declared, use the computed value of the property color for the same element; otherwise, same as declared value

Description:

Sets the color for the visible portions of the top border of an element. The border’s style must be something other than none or hidden for any visible border to appear.

Examples:

ul {border-top-color: black;}
h1 {border-top-color: gray;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required