CSS border-color property

Description

CSS border-color property is a short hand property of border-top-color, border-right-color, border-bottom-color, and border-left-color properties. It defines the color for all the sides of a block.

Syntax

border-color : border-top-color   border-right-color   border-bottom-color   border-left-color

Property values

currentColorDefault

It is the same as border-color: currentColor currentColor currentColor currentColor;

border-color: currentColor;

red green

It is the same as border-color: red green red green;

border-color: red green;

red green blue

It is the same as border-color: red green blue green;

border-color: red green blue;

red green blue yellow

It is the same as border-color: red green blue yellow;

border-color: red green blue yellow;

Applicable to

It applies to all elements

#CSS digger
Was this article helpful?

 
arrow
The color of text is green. Therefore the currentColor for the border is also green.
×

Ctrl+D