HTML | DOM Style borderBottomWidth Property
The style borderBottomWidth property in HTML DOM is used to set or return the width of bottom border of an element.
Syntax:
- It is used to return the width of bottom border.
object.style.borderBottomWidth
- It is used to set the width of the bottom border.
border-bottom-width: "medium|thin|thick|length|initial|inherit";
Return Value: It returns bottom border width of selected element.
Property Values:
- medium: It sets the medium size bottom border. It is the default value.
- thin: It sets the thin border of the bottom.
- thick: It sets the thick bottom border.
- length: It sets the width of the border. It does not takes negative value.
- initial: It sets the borderBottomWidth property to its default value.
- inherit: This is used to inherits from its parent element.
Example 1: This example use thick value of borderBottomWidth property.
<!DOCTYPE html> <html> <head> <title> HTML | DOM Style borderBottomWidth Property </title> <style> div { color: green; border: 1px solid green; text-align: center; } </style> </head> <body> <div id="main"> <h1>GeeksforGeeks.!</h1> </div> <br> <input type="button" value="Click Me.!" onclick="geeks()" /> <script> function geeks() { document.getElementById("main").style.borderBottomWidth = "thick"; } </script> </body> </html> |
Output:
Before click on the button:

After click on the button:

Example 2: This example use thin value of borderBottomWidth Property.
<!DOCTYPE html> <html> <head> <title> HTML | DOM Style borderBottomWidth Property </title> <style> div { color: green; border: 8px solid green; text-align: center; } </style> </head> <body> <div id = "main"> <h1>GeeksforGeeks.!</h1> </div> <br> <input type = "button" value = "Click Me.!" onclick = "geeks()" /> <script> function geeks() { document.getElementById("main").style.borderBottomWidth = "thin"; } </script> </body> </html> |
Output:
Before click on the button:

After click on the button:

Supported Browsers: The browser supported by Style borderBottomWidth property are listed below:
- Google Chrome 1.0
- Internet Explorer 4.0
- Firefox 1.0
- Opera 3.5
- Safari 1.0
Recommended Posts:
- HTML | DOM Style top Property
- HTML | DOM Style right Property
- HTML | DOM Style isolation Property
- HTML | DOM Style transitionProperty Property
- HTML | DOM Style animationDirection Property
- HTML | DOM Style animationTimingFunction Property
- HTML | DOM Style opacity Property
- HTML | DOM Style height Property
- HTML | DOM Style whiteSpace Property
- HTML | DOM Style transitionDelay Property
- HTML | DOM Style columnRuleColor Property
- HTML | DOM Style position Property
- HTML | DOM Style cssFloat Property
- HTML | DOM Style columns Property
- HTML | DOM Style textDecoration Property
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.



