Open In App

HTML DOM Style borderBottomStyle Property

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

Syntax:



object.style.borderBottomStyle
border-bottom-style: value;

Property Values:

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



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




<!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. 




<!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:


Article Tags :