CSS Padding property is used to define the space between the element content and the element border.
It is different from CSS margin in the way that CSS margin defines the space around elements. CSS padding is affected by the background colors. It clears an area around the content.
Top, bottom, left and right padding can be changed independently using separate properties. You can also change all properties at once by using shorthand padding property.
CSS Padding Properties
CSS Padding Values
CSS Padding ExampleTest it Now
This is a paragraph with no specified padding.
This is a paragraph with specified paddings.