<?xml version="1.0" encoding="utf-8"?>

CSS padding property

CSS padding property Bad Practice
CSS padding property Best Practice

Like people, elements on a page need some personal space, and padding is here for that. In other words, it's the white space within an element border. With padding, elements stand out and are easy to perceive.

For setting padding, you can use a common padding property and define all four values in a clockwise order (top, right, bottom, and left padding) at once, separated by gaps.

Like many other things in the HTML/CSS universe, you can define padding with pixels.

Improve your UX & Product skills with interactive courses that actually work