<!DOCTYPE html>
<html lang="en-US">
<head>
<style>
div{
border: 1px solid black;
width: 200px;
margin-bottom: 20px;
}
</style>
</head>
<body>
<h1>CSS padding-right Property</h1>
<div>This is div.</div>
<button onclick="myFunction()">Click Me</button>
<script>
var x = document.getElementsByTagName("div")[0];
function myFunction(){
x.style.paddingRight = "50px";
}
</script>
<p><strong>Note</strong>: click on the button to apply css 'padding-right' property.</p> </body>
</html>