Open In App

HTML DOM Style borderBottomStyle Property

Last Updated : 15 Jun, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

The style borderBottomStyle property in HTML DOM is used to set or return the style of the bottom border of an element. 

Syntax:

  • It returns the style of the bottom border.
object.style.borderBottomStyle
  • It sets the style of the bottom border.
border-bottom-style: value;

Property Values:

  • none: It is the default value and it makes the width of bottom border to zero. Hence, it is not visible.
  • hidden: It is used to make bottom border invisible. It is similar to none value except in case of border conflict resolution of table elements.
  • dotted: It specifies the dotted border.
  • dashed: It specifies the dashed border.
  • solid: It specifies the solid border.
  • double: It makes the bottom border to double solid line. In this case, the border width is equal to the sum of widths of the two line segments and the space between them.
  • groove: It specifies a 3D grooved border but this effect depends on the border-color value.
  • ridge: It specifies a 3D ridged border but this effect depends on the border-color value.
  • inset: It specifies a 3D inset border but this effect depends on the border-color value.
  • outset: It specifies a 3D outset border but this effect depends on the border-color value.
  • initial: It sets the borderBottomStyle property to its default value.
  • inherit: This inherits the property from its parent element.

Return Value: It returns the bottom border with selected style. 

Example 1: This example describes the dotted value of borderBottomStyle property. 

HTML




<!DOCTYPE html>
<html>
   
<head>
    <title>
        HTML DOM Style borderBottomStyle Property
    </title>
    <style>
        div {
            color: green;
            text-align: center;
            border: 4px solid green;
        }
    </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.borderBottomStyle = "dotted";
        }
    </script>
</body>
   
</html>


Output:

 

Example 2: This example describes the double value of the borderBottomStyle property. 

HTML




<!DOCTYPE html>
<html>
   
<head>
    <title>
        HTML DOM Style borderBottomStyle Property
    </title>
    <style>
        div {
            color: green;
            text-align: center;
            border: 4px solid green;
        }
    </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.borderBottomStyle = "double";
        }
    </script>
</body>
   
</html>


Output:

 

Supported Browsers: The browser supported by DOM style borderBottomStyle property are listed below:

  • Google Chrome 1.0
  • Edge 12
  • Internet Explorer 5.5
  • Firefox 1.0
  • Opera 9.2
  • Safari 1.0


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads