CSS border-left-color Property Tutorial

In this section, we will learn what the border-left-color property is and how to use it in CSS.

Click here to run the example of border-left-color property.

CSS border-left-color Property Definition and Usage

The border-left-color property is used to set a color value for the left border of an element.

Note: before using this property, the border should already exist. We can create a border via the border-style, border-bottom-style, or border property.

CSS border-left-color Property Syntax

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

CSS border-left-color Property Value

We can use RGB, RGBA, HSL, HSLA, color-name as the value of this property.

Also, we could use the value “transparent” to set a transparent color for the target bottom border.

Example: border-left-color property in CSS

See the Pen Untitled by Enjoy Tutorials (@enjoytutorials) on CodePen.

How Does CSS border-left-color Property Work?

Here we’ve used the border-left-color property to change the color of the left border from black to red. (The default color is the color of the element’s font)


Top Technologies