CSS Padding
Padding is inside space between content and border.
David Miller
Dec 23, 2025
24.9k822
Padding is space inside an element.
Example
.card {
padding: 20px;
}
UI Preview
- text inside card becomes more comfortable
- content does not touch border
Real world example
Buttons look better with padding.
#CSS#Beginner