CSS margin-left

Please Share On:

Definition:

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

Syntax:

margin-left: 10px;

Source Code:

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

  <body>
    <div class="paragraph">Left 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