CSS border-left-color Tutorial

CSS border-left-color

The border-left-color property in CSS is used to specify the color of the left border of an element. You can set the color using a color name, hex code, RGB value, or HSL value.

Here is an example using the border-left-color property:

Result:

    .border-example {
      border-left-color: blue;
      border-left-width: 2px;
      border-left-style: dashed;
      padding: 10px;
    }
  
This is an example of a div with a blue dashed left border.

In the example above, the border-left-color property is set to "blue", the border-left-width is set to 2 pixels, and the border-left-style is set to "dashed". The div has padding of 10 pixels.

Here is another example using a RGB value for the left border color:

Result:

    .border-example {
      border-left-color: rgb(255, 0, 0);
      border-left-width: 1px;
      border-left-style: solid;
      padding: 10px;
    }
  
This is an example of a div with a red solid left border.

In this example, the border-left-color property is set to an RGB value of "rgb(255, 0, 0)" which represents red. The border-left-width is set to 1 pixel, and the border-left-style is set to "solid". The div has padding of 10 pixels.