HTML DOM Style borderLeftColor Property Last Updated : 29 Jan, 2024 Comments Improve Suggest changes Like Article Like Report The borderLeftColor property in HTML DOM allows us to set/get the color to the left border of an element. Syntax: It is used to return the borderLeftColor property. object.style.borderLeftColorIt is used to set the borderLeftColor property. object.style.borderLeftColor = "color | transparent | initial | inherit"Return Value: The borderLeftColor property returns the color of the left border of an element. Property Values: Property Value Description color It specifies the border color of corresponding element. Black is default color. transparent It sets the border color of corresponding element to transparent. initial When no value specified for this field, it is inherited from the parent of element. If there is no parent means this element is root then it takes initial(or default) value. inherit This keyword applies the initial(or default) value of a property to an element. The initial value should not be confused by the value specified by the browser’s style sheet. When borderColor sets to initial, It appears black(default) color. Example 1: This example change the border left color using borderLeftColor property. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Style borderLeftColor Property </title> <style> body { text-align: center; } #GFG { width: 200px; margin: auto; padding: 10px 20px; border: thick solid green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h3>HTML DOM Style borderLeftColor Property</h3> <div id="GFG"> Welcome to GeeksforGeeks </div><br> <button onclick="myGeeks()"> Click Here! </button> <script> function myGeeks() { document.getElementById("GFG") .style.borderLeftColor = "red"; } </script> </body> </html> Output: Example 2: This example sets the border left color to transparent. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM Style borderLeftColor Property </title> <style> body { text-align: center; } #GFG { width: 200px; margin: auto; padding: 10px 20px; border: thick solid green; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h3>HTML DOM Style borderLeftColor Property</h3> <div id="GFG"> Welcome to GeeksforGeeks </div><br> <button onclick="myGeeks()"> Click Here! </button> <script> function myGeeks() { document.getElementById("GFG") .style.borderLeftColor = "transparent"; } </script> </body> </html> Output: Supported Browsers: Google Chrome 1Edge 12Mozilla Firefox 1Opera 3.5Safari 1 Create Quiz Comment P PranchalKatiyar Follow 0 Improve P PranchalKatiyar Follow 0 Improve Article Tags : JavaScript HTML-DOM HTML-Property Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings5 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in JavaScript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)8 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readScope of Variables in JavaScript3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read Like