CSS Padding Property
CSS Padding property is used to define the space between the element content and the element border
The value of this attribute should be either a length, a percentage, or the word inherit. If the value is inherit, it will have the same padding as its parent element. If a percentage is used, the percentage is of the containing box.
The following properties are there to set an element margin.
- padding-top: the
padding-topproperty is used to set the padding at top of an element.
- padding-Bottom: the
padding-bottomproperty is used to set the padding at bottom of an element.
- padding-left: the
padding-leftproperty is used to set the padding at left of an element.
- padding-right: the
padding-rightproperty is used to set the padding at right of an element.
Different padding on each side.
This is a paragraph with no specified padding.
This is a paragraph with specified paddings.