CSS padding and margin properties

Padding

Space around element content or space between border and content.

padding Shorthand to apply padding from more than one side
padding-top Content space from top
padding-bottom Content space from bottom
padding-left Content space from left
padding-right Content space from right

Margin

Space around an element, or space between two element.

margin Space from all sides
margin-top Space from top side
margin-bottom Space from bottom side
margin-left Space from left side
margin-right Space from right side
© 2016 - 2022, All Rights are Reserved.