I am trying to remove the display:block property in the given css class using javascript.
This is the Code
<!DOCTYPE html>
<html>
<head>
<style>
.abc{
display:block;
color:green;
font-weight:bold;
text-decoration:Underline;
}
</style>
</head>
<body>
<h1>The removeProperty() Method</h1>
<p class="abc">Click the button to remove the color property.</p>
<button onclick="myFunction()">Remove Property it</button>
<script>
function myFunction() {
var d1 = document.getElementsByClassName('abc');
d1.style.removeProperty('display');
}
</script>
</body>
</html>
not able to achieve! Did I miss something?