What is the CSS border-left property?
The border-left property in CSS is used to define the properties of the bottom left, such as style, color, and width, all in just one line.
border-left is a shorthand property of the following:
border-left-widthborder-left-styleborder-left-color
border-left-styleis compulsory to define.
Syntax
border-left: border-width border-style border-color|initial|inherit;
Property values
-
border-left-width:Specifies the width of the border. The default value isMedium. -
border-left-style:Sets the style of the border. The default value isNULL. -
border-left-color:Sets the color of the border. -
initial:Sets the value to its default value. -
inherit:Inherits property from its parent value.
Code
In this example, we set the left border, and the color is set to violet. If we want to change the left border color, we select the color of our choice.