HTML | DOM Style borderBottom Property
The DOM style borderBottom property is used to set or returns the three different border-bottom property such as border-bottom-width, border-bottom-style and border-bottom-color of an element.
Syntax:
- It returns the borderBottom Property.
object.style.borderBottom
- It is used to set the borderBottom property.
object.style.borderBottom = "width style color|initial|inherit"
Parameter:
- width: It holds the width of the bottom border.
- style: It sets the bottom border style.
- Color: Sets the color of the bottom border.
- Initial: Sets the property it’s default.
- inherit: Inherit the property from it’s parent.
Return Value: It returns a string value which represent the width, style and/or color of the bottom border of an element.
Example:
<!DOCTYPE html> <html> <head> <title>DOM Style borderBottom Property </title> </head> <body> <center> <h1 style = "color:green;width:50%;" id = "sudo"> GeeksForGeeks </h1> <h2>DOM Style borderBottom Property </h2> <br> <button type = "button" onclick = "geeks()"> Submit </button> <script> function geeks() { document.getElementById("sudo").style.borderBottom = "thick solid green"; } </script> </center> </body> </html> |
Output:
Before Click on the button:

After Click on the button:

Example 2:
<!DOCTYPE html> <html> <head> <title>DOM Style borderBottom Property</title> </head> <body> <center> <h1 style = "color:green;"> GeeksForGeeks </h1> <h2>DOM Style borderBottom Property </h2> <h3 style = "border:2px solid red;width:50%;" id = "sudo">geksforgeeks</h3> <br> <button type = "button" onclick = "geeks()"> Submit </button> <script> function geeks() { document.getElementById("sudo").style.borderBottom = "thick dotted green"; } </script> </center> </body> </html> |
Output:
Before Click on the button:

After Click on the button:

Supported Browsers: The browser supported by DOM Style borderBottom 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 right Property
- HTML | DOM Style top Property
- HTML | DOM Style transitionProperty Property
- HTML | DOM Style textIndent Property
- HTML | DOM Style outlineOffset Property
- HTML | DOM Style paddingLeft Property
- HTML | DOM Style isolation Property
- HTML | DOM Style position Property
- HTML | DOM Style userSelect Property
- HTML | DOM Style cssFloat Property
- HTML | DOM Style flexBasis Property
- HTML | DOM Style animationTimingFunction Property
- HTML | DOM Style tableLayout Property
- HTML | DOM Style columnRuleColor Property
- HTML | DOM Style transformStyle 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.
Improved By : shubham_singh



