The padding property is a shorthand tag to define all the paddings of an element.
padding: [ <length> | <percentage> ]{1,4}
padding: <padding-top> <padding-right> <padding-bottom> <padding-left>
- length
A specific length (include unit of measure). - percentage
A percentage of the height of the closest block-level ancestor.
Not defined for shorthandproperties.
All elements.
This property is not inherited.
standard padding
<p style="padding : 2em;">
This paragraph has a 2 em top padding.
</p>
set top and bottom the same and right and left the same
<p style="padding : 2em 1em;">
This paragraph has a 2 em padding on the top and bottom and a 1em padding on the right and left.
</p>
- Negative values are not permitted.
- The padding will inherit the background properties of the element.

