HTML DOM Style borderBottomStyle Property


The borderBottomStyle property is used for setting or getting the line style for an element’s bottom border.

Syntax

Following is the syntax for −

Setting the borderBottomStyle property 

object.style.borderBottomStyle = value

Values

The property values are explained as follows −

Sr.NoValues & Description
1none
This is the default value and defines no border.
2hidden
This is same as "none" but will still take border space. It is basically transparent but still there.
3dotted
This defines a dotted border.
4dashed
This defines a dashed border.
5solid
This defines a solid border.
6double
This defines a double border.
7groove
This defines a 3d groove border and is the opposite of ridge.
8ridge
This defines a 3D ridged border and is the opposite of groove.
9inset
This defines a 3D inset border and the effect looks like it is embedded. It produces the opposite effect of outset.
10outset
This defines a 3D inset border and the effect looks like it is embossed. It produces the opposite effect of inset.
11initial
For setting this property to initial value.
12inherit
To inherit the parent property value

Example

Let us look at an example for the borderBottomStyle Property −

Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
   #DIV1{
      width:300px;
      height:100px;
      border-bottom: 8px solid dodgerblue;
      border-bottom-style: groove;
   }
</style>
<script>
   function changeBottomStyle(){
      document.getElementById("DIV1").style.borderBottomStyle="dashed";
      document.getElementById("Sample").innerHTML="The bottom border style is now changed";
   }
</script>
</head>
<body>
<div id="DIV1">SOME SAMPLE TEXT</div>
<p>Change the div bottom border style size by clicking the below button</p>
<button onclick="changeBottomStyle()">Change Bottom Style</button>
<p id="Sample"></p>
</body>
</html>

Output

This will produce the following output −

On clicking the “Change Bottom Style” button −

Updated on: 15-Feb-2021

31 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements