`border-left-color` CSS property
The border-left-color CSS property sets the color of an element's left border. It can also be set with the shorthand CSS properties border-color or border-left.
The **`border-left-color`** [CSS](/docs/Web/CSS) property sets the color of an element's left [border](/docs/Web/CSS/Reference/Properties/border). It can also be set with the shorthand CSS properties border-color or border-left.
CSS Demo: border-left-color
```css interactive-example-choice
border-left-color: red;
```
```css interactive-example-choice
border-left-color: #32a1ce;
```
```css interactive-example-choice
border-left-color: rgb(170 50 220 / 0.6);
```
```css interactive-example-choice
border-left-color: hsl(60 90% 50% / 0.8);
```
```css interactive-example-choice
border-left-color: transparent;
```
```html interactive-example
<section class="default-example" id="default-example">
<div class="transition-all" id="example-element">
This is a box with a border around it.
</div>
</section>
```
```css interactive-example
#example-element {
background-color: #eeeeee;
color: black;
border: 0.75em solid;
padding: 0.75em;
width: 80%;
height: 100px;
}
```
## Syntax
```css
/* <color> values */
border-left-color: red;
border-left-color: #ffbb00;
border-left-color: rgb(255 0 0);
border-left-color: hsl(100deg 50% 25% / 75%);
border-left-color: currentColor;
border-left-color: transparent;
/* Global values */
border-left-color: inherit;
border-left-color: initial;
border-left-color: revert;
border-left-color: revert-layer;
border-left-color: unset;
```
### Values
This property is specified as one value:
- <color>
- : The color of the left border.
## Formal definition
## Formal syntax
## Examples
### A div with a border
#### HTML
```html
<div class="my-box">
<p>
This is a box with a border around it. Note which side of the box is
<span class="red-text">red</span>.
</p>
</div>
```
#### CSS
```css
.my-box {
border: solid 0.3em gold;
border-left-color: red;
width: auto;
}
.red-text {
color: red;
}
```
#### Result
A_div_with_a_border
## Specifications
## Browser compatibility
## See also
- The border-related CSS shorthand properties: border, border-left, and border-color.
- The color-related CSS properties for the other borders: border-right-color, border-bottom-color, and border-top-color.
- The other border-related CSS properties applying to the same border: border-left-style and border-left-width.
- The default [`currentColor`](/docs/Web/CSS/Reference/Values/color_value#currentcolor_keyword) color value.
Cite this
"`border-left-color` CSS property". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/border-left-color JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy