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

Padding

Padding Bad Practice
Padding Best Practice

If we imagine that all HTML elements are encased in invisible boxes, the paragraph's padding would be the space between the textual content and the box border. By default, this space is zero, meaning that the border lies where the content ends. Some elements have extra space outside the border called the "margin" — for example, paragraphs and headings.

But what if you wanted to set custom space between the content and its border? You can totally do this by using the property padding inside the style attribute. Set the value of the padding you desire in pixels, and you're good to go!

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