CSS | border-left-style Property

The CSS border-left-style property is used to set the style of the left border of an element.

Syntax:

border-left-style: none| hidden| dotted| dashed| solid| double |
groove| ridge| inset| outset| initial| inherit;

Properties Value:



Value Description
none It sets no left border.
hidden It sets no border, except border conflict resolution for table elements.
dotted It sets a dotted left border.
dashed It sets a dashed left border.
solid It sets a solid left border.
double It sets a double border.
groove It sets a 3D grooved left border.
ridge It sets a 3D ridged left border.
inset It sets a 3D inset left border.
outset It sets a 3D outset left border.
initial It sets the border-left-style property to its default value.
inherit It inherits the property values from its parent element.

Return Value: It returns the style of left border of an element.

Example-1: Showing Dotted Left Border.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <style>
        h1 {
            border-left-style: dotted;
        }
          
        div {
            border-style: solid;
            border-left-style: dotted;
        }
    </style>
</head>
  
<body>
  
    <h1>Geeks for Geeks</h1>
  
    <div>
        <h3>Dotted Left Border</h3></div>
  
</body>
  
</html>

chevron_right


Output:

Example-2: Showing Double Left Border

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <style>
        h1 {
            border-left-style: double;
        }
          
        div {
            border-style: solid;
            border-left-style: double;
        }
    </style>
</head>
  
<body>
  
    <h1>Geeks for Geeks</h1>
  
    <div>
        <h3>Double Left Border</h3></div>
  
</body>
  
</html>

chevron_right


Output:

Example-3: Showing Solid Left Border

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <style>
        h1 {
            border-left-style: solid;
        }
          
        div {
            border-style: solid;
            border-left-style: solid;
        }
    </style>
</head>
  
<body>
  
    <h1>Geeks for Geeks</h1>
  
    <div>
        <h3>Solid Left Border</h3></div>
  
</body>
  
</html>

chevron_right


Output:

Supported Browsers: The browsers supported by CSS Border Left Style Property are listed below:

  • Google Chrome
  • Firefox
  • Internet Explorer
  • Opera
  • Safari


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.