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

CSS padding property

CSS padding property Bad Practice
CSS padding property Best Practice

Padding creates space around an element within the defined borders of its container. We need padding to let the content breathe and bring visual clarity to the design. CSS provides you complete control over the padding.

You can either use a common padding property and define all four values (top, right, bottom, and left padding) at once. Or you can specify each value separately with the padding-top, padding-right, padding-bottom, and padding-left properties.

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