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

Applying CSS padding property

The default value of all padding is 0, which means that all box elements start with no extra spacing. To add space within the element, you'll want to add padding.

Besides the shorthand property padding, you can apply padding to each side of the element individually with:

  • padding-top
  • padding-right
  • padding-bottom
  • padding-left
Improve your UX & Product skills with interactive courses that actually work