HTML CSS examples for CSS Property:border-top-color
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. |
The syntax of the property is as follows:
border-top-color: color | transparent | initial | inherit
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.
<!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>