Copyright © tutorialspoint.com
The margin-right property sets the width of the margin on the right of an element.
All the HTML elements
object.style.marginRight="5px" |
Here is the example:
<p style="margin-right: 15px; border:1px solid black;"> This is a paragraph with a specified right margin </p> <p style="margin-right: 5%; border:1px solid black;"> This is another paragraph with a specified right margin in percent </p> |
This will produce following result:
This is a paragraph with a specified right margin This is another paragraph with a specified right margin in percent |
To Become more comfortable - Do Online Practice
Copyright © tutorialspoint.com