Edit This Code:
<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
    width: 100px;
    height: 100px;
    background-color: coral;
    color: white;
}

</style>
</head>
<body>

<p>Click the "Try it" button to change the width of the DIV element:</p>

<button onclick="myFunction()">Try it</button>

<div id="myDIV">
  <h1>myDIV</h1>
</div>

<script>
function myFunction() {
    document.getElementById("myDIV").style.width = "500px";
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy