Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>HTML Style Object</h1>
<h2>The border Property</h2>
<div id="myDiv" style="border:1px solid red;">This is a div element.</div>
<p>The border is:</p>
<p id="demo"></p>
<script>
let border = document.getElementById("myDiv").style.border;
document.getElementById("demo").innerHTML = border;
</script>
</body>
</html>