CSS Padding
Padding is inside space between content and border.
David Miller
December 24, 2025
3.5k76
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