Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTML | DOM Style borderBottomStyle Property

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The style borderBottomStyle property in HTML DOM is used to set or returns the style of the 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;

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:

  • Before click on the button:
  • After click on the button:

Example 2: This example describes the double 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
                    = "double";
        }
    </script>
</body>
 
</html>                   


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
  • Edge 12
  • Internet Explorer 5.5
  • Firefox 1.0
  • Opera 9.2
  • Safari 1.0

My Personal Notes arrow_drop_up
Last Updated : 09 Aug, 2022
Like Article
Save Article
Similar Reads
Related Tutorials