Easy Tutorial
❮ Prop Style Borderleftstyle Jsref Getutcminutes ❯

Style borderLeft Property


Definition and Usage

The borderLeft property sets or returns the three individual left border properties in a shorthand form.

Using this property, you can set/return:

Syntax

Set the borderLeft property:

Return the borderLeft property:

Note: The borderLeft property has no default value.

Parameter Description
width Sets the width of the left border.
style Sets the style of the left border.
color Sets the color of the left border.

Browser Support

All major browsers support the borderLeft property.


Example

Change the width, style, and color of the left border:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>tutorialpro.org(tutorialpro.org)</title> 
<style type="text/css">
#ex1{
    border: thin dotted #FF0000;
}
</style>
<script>
function displayResult(){
    document.getElementById("ex1").style.borderLeft="thick solid #0000FF";
}
</script>
</head>
<body>

<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Modify Left Border</button>

</body>
</html>

❮ Prop Style Borderleftstyle Jsref Getutcminutes ❯