<html>
<head>
<style>
#myDIV {
background-color: lightblue;
}
</style>
</head>
<body>
<h1>Change margin-right with JavaScript</h1>
<p>Click the "Try it" button to change the right margin of the DIV element:</p>
<button onclick="myFunction()">Try it</button>
<div id="myDIV">
This is my DIV element.
</div>
<script>
function myFunction() {
document.getElementById("myDIV").style.marginRight = "100px";
}
</script>
</body>
</html>