Every HTML element is a box. The box has 4 layers. Hover any layer to see what each CSS property controls.
.example {
margin: 40px;
border: 20px solid red;
padding: 30px;
background: blue;
color: white;
}
Memory aid: padding = space inside the border. margin = space outside the border.