Advertisement
Google Ad Slot: content-top
CSS Padding
In CSS, the padding property is used to control the space inside an element, between the content and the element's border. Padding helps create breathing room around an element's content.
Syntax:
padding: <value>;
Value: Can be a length (e.g., px, em, %), or keywords like inherit.
Individual Paddings:
You can specify padding for each side of the element individually using these properties:
padding-toppadding-rightpadding-bottompadding-left
Shorthand for Paddings:
Like margin, padding also has shorthand for setting different values for the sides in one declaration:
Syntax:
padding: <top> <right> <bottom> <left>;