What is the CSS border-left-width property?

The border-left-width property in CSS is used to set the width of the element’s left border.

In order to use the border-left-width we must first declare the border-style or border-left-style property.

Syntax

border-left-width: medium|thin|thick|length|initial|inherit;

Property Values

  • medium: It is the default value. It is used to specify that the left border is medium.

  • thin: Specifies that the left border is thin.

  • thick: Specifies that the left border is thick.

  • length: Defines the left border’s thickness.

  • initial: Sets the value to it’s default value.

  • inherit: Inherits property from its parent value.

Code

In the code above, the left border of the <pre> tag is specified to be blue and solid using the border-left-color and border-left-style properties. The width is set to 15px using the border-left-width property.

Free Resources