border-left-style - HTML CSS CSS Property

HTML CSS examples for CSS Property:border-left-style

Description

The border-left-style CSS property sets the style of an element's left border.

The following table summarizes the usages context and the version history of this property.

Item Value
Default value: none
Applies to:All elements
Inherited: No
Animatable: No.

Syntax

The syntax of the property is as follows:

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

Property Values

The following table describes the values of this property.

Value Description
noneNo border will be displayed.
hidden Same as 'none'
dotted a series of dots.
dashed a series of short line segments i.e. dashes.
solid a single solid line.
double a two parallel solid lines.
groove Looks like carved into the canvas.
ridge opposite effect of 'groove'.
inset Looks like embedded in the canvas.
outset opposite effect of 'inset'.
initial Sets this property to its default value.
inherit takes the computed value of its parent element border-bottom-style property.

The example below shows the border-left-style property.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS border-left-style property</title>
  <style type="text/css">
      p {<!--from  w  w w  .j a va2s.c  o m-->
          border-lef-width: 3px;
      }
      p.none {
          border-left-style: none;
      }
      p.dotted {
          border-left-style: dotted;
      }
      p.dashed {
          border-left-style: dashed;
      }
      p.solid {
          border-left-style: solid;
      }
      p.double {
          border-left-style: double;
      }
      p.groove {
          border-left-style: groove;
      }
      p.ridge {
          border-left-style: ridge;
      }
      p.inset {
          border-left-style: inset;
      }
      p.outset {
          border-left-style: outset;
      }
  </style>
 </head>
 <body>
  <h1>Various border style.</h1>
  <p class="none">No left border.</p>
  <p class="dotted">A dotted left border.</p>
  <p class="dashed">A dashed left border.</p>
  <p class="solid">A solid left border.</p>
  <p class="double">A double left border.</p>
  <p class="groove">A groove left border.</p>
  <p class="ridge">A ridge left border.</p>
  <p class="inset">An inset left border.</p>
  <p class="outset">An outset left border.</p>
 </body>
</html>

Related Tutorials