Check out example codes for "margin css". It will help you in understanding the concepts better.

Code Example 1

p {
    margin: 25px 50px 75px 100px; /* Top, Right, Bottom, Left */
}

Code Example 2

p {
  margin-top: 100px;

  margin-bottom: 100px;

  margin-right: 150px;

  margin-left: 80px;
}

Code Example 3

p {
  margin: 25px 50px 75px 100px;
  /*in order:
  top right bottom left */
}

Code Example 4

body {
  margin: 0px;
}

Code Example 5

margin in css

Code Example 6

/* Apply to all four sides */
margin: 1em;
margin: -3px;

/* vertical | horizontal */
margin: 5% auto;

/* top | horizontal | bottom */
margin: 1em auto 2em; 

/* top | right | bottom | left */
margin: 2px 1em 0 auto;

/* Global values */
margin: inherit;
margin: initial;
margin: unset;

Learn ReactJs, React Native from akashmittal.com