Padding
Space inside an element, between its content and its edge.
See it on the 3D treeGoing deeper
It sits between content and border, takes on the element's background and counts towards the clickable area of a button or link. Each side can differ. Whether padding adds to a declared width in CSS depends on the box-sizing setting.
Why it matters
It affects legibility, comfort and how easy controls are to hit, all without changing the content itself.
In practice
A small text link in a mobile menu is hard to tap, so you add vertical padding to enlarge its target.
Common mistake
Setting a fixed height instead of padding, so text is clipped or crowded when it wraps or is enlarged.
Connected terms
- MarginMargin separates an element from others; padding separates content from its edge.
- Spacing SystemPadding values are usually drawn from the spacing scale.
- Box ModelPadding is the layer between content and border.
- Touch TargetPadding is a simple way to enlarge a tappable area.