CSS margin-right

Please Share On:

Definition:

CSS margin-right applies space outside the defined right border.

Syntax:

margin-right: 10px;

Source Code:

<!DOCTYPE html>
<html>
  <head>
    <style>
    .paragraph{
      border: 2px dashed red;
      background-color: pink;
      text-align:center;
      margin-right: 10px;
    }
    </style>
  </head>

  <body>
  	<div class="paragraph">Right Margin is 10px; </div>
  </body>
</html>

Output:


Donate to support writers


You may be interested in the following topics:

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright @2023. All Right Reserved.


Social media & sharing icons powered by UltimatelySocial