border-top-color - HTML CSS CSS Property

HTML CSS examples for CSS Property:border-top-color

Description

The border-top-color CSS property sets the color of an element's top border.

The following table summarizes the usages context and the version history of this property.

Item Value
Default value: The value of the color property
Applies to:All elements
Inherited: No
Animatable: Yes.

Syntax

The syntax of the property is as follows:


border-top-color:     color | transparent | initial | inherit

Property Values

The following table describes the values of this property.

Value Description
color Set the color of the top border.
transparent transparent border.
initial Sets this property to its default value.
inherit take the value of its parent element border-top-color property.

The example below shows the border-top-color property.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS border-top-color property</title>
  <style type="text/css">
    p {<!--from   w ww  .  j  a v  a 2  s  .  co m-->
      border-style: solid;
      border-top-color: #ff0000;
    }
    </style>
 </head>
 <body>
  <p>This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. This is a test. </p>
 </body>
</html>

Related Tutorials