CSS Padding

Last Updated: March 27, 2022

Padding is the space between an element’s content and the border.

Syntax for CSS padding

padding: top right bottom left

padding: 3 4 3 4;

padding: 2px 5px; is equal to padding: 2px 5px 2px 5px

Test