HTML DOM Style borderLeftWidth Property

HTMLDOMWeb DevelopmentFront End Technology

The HTML DOM borderLeftWidth property is used for setting or getting the Left border width for an element.

Following is the syntax for −

Setting the borderLeftWidth property − = "thin|medium|thick|length|initial|inherit"

The property values are explained as follows −

thinThis specifies a thin border.
mediumThis specifies the medium border and is the default value.
thickThis specifies a thin border.
lengthFor setting this property to default value.
initialFor setting this property to initial value.
inheritTo inherit the parent property value

Let us look at an example for the borderLeftWidth Property −


 Live Demo

<!DOCTYPE html>
      height: 100px;
      width: 200px;
      border: 10px groove orange;
      padding: 10px;
   function changeLeftWidth(){
      document.getElementById("Sample").innerHTML="The Left border width is now decreased";
<div id="DIV1">SOME SAMPLE TEXT</div>
<p>Change the above div Left border width by clicking the below button</p>
<button onclick="changeLeftWidth()">Change Left Width</button>
<p id="Sample"></p>


On clicking the “Change Left Width” button −

Published on 22-Oct-2019 17:27:59