CSS

CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise

CSS3

CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

CSS border color Property

CSS border-color Property

 

 

The border-color property is used to set the color of an element four borders i.e, top, right, bottom, left.

 

For your Information:-

 

If only one color is specified then it is applied on all four borders.

If two colors are specified, then the first one will color the top and bottom and the second one will color the right and left.

If three colors are specified, then the first one will color the top border and the second one will color the right and left borders and the third one will color the bottom.

If all four colors are specified then each color goes to each border in the sequence.

 

Syntax:-

 

Its syntax is:- border-color: color | transparent | initial | inherit;

 

Further Explanation:-

 

Value Description
color Specifies the border color.
transparent Specifies that the border color should be transparent
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS Properties

All Sections related to CSS