CSS3 border property allows us to specify the style, width, and color property of an HTML element's border.
If we want to change the style of the border of an HTML element we can use CSS3 Border Property.
{border-style : solid;}
property value
<!DOCTYPE html>
<html>
<head>
<style>
.tdb-school{
background-color:white;
padding:10px 35px;
border-style:dotted;
border-radius:5px}
</style>
</head>
<!--Body-->
<body>
<button type="submit" class="tdb-school">
button border properties
</button>
</body>
</html>
Border radius property is used to set the curve shape (rounded corners) while applying on HTML elements.
{border-radius: 10px;} property value
<!DOCTYPE html>
<html>
<head>
<style>
.tdb-school{
border-radius:20% 80% 20% 80%;
padding:50px;
width:100px;
color:white;
text-align:center;
background:linear-gradient(130deg,black,red);
}
</style>
</head>
<!--Body-->
<body>
<div class="tdb-school">
border-radius
</div>
</body>
</html>
If you don't want to write different CSS rules for border property then you can use border Shorthand property.
{border: color style width}
property value
<style>
/*order shorthans*/
.parent{
border: color style width;
}
</style>
<!DOCTYPE html>
<html>
<!--Body-->
<body>
<button type="submit" class="tdb-school"
style="border:black double 5px;padding:10px 35px;">
button border properties
</button>
</body>
</html>
If you want to set the border image on an HTML element's border, you can use border-image property.{border-image :
url(js.png) 25 round}
property value
<style>
/*order shorthans*/
.parent{
border-image: url(js.png) 20 round;
}
</style>
<style>
/*order shorthans*/
.tdb-image{
border-image: url(js.png) 20 round;
padding:25px;
}
</style>
<body>
<button class="tdb-image" type="submit"
class="tdb-school">
border-image properties
</button>
</body>