<body> <div style="border:2px solid red"> This image has a margin <img style="width:50px; height:50px; background-color:green; margin-left:50px; margin-right:50px"> on it. </div>