HTML | DOM Style borderBottomStyle Property

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

Syntax:

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

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

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.

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

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
<head>
    <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>                    

chevron_right


Output:
Before click on the button:

After click on the button:

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

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <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>                    

chevron_right


Output:
Before click on the button:

After click on the button:

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

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


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

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.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.