CSS border-top-color Property


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

border-top-color property provide option to fill different color from parent border-color to top border of the container.

Note: Always declare the border-style or the border-top-style property before the border-top-color property. An element must have a border before you can change the color.

CSS Syntax

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

Example -