Skip to Content
Boundaries and Space
Working with Padding

The CSS padding property controls the empty space between the page element’s content and its border. Increasing a page element’s padding makes the space around the content more spacious, while decreasing it makes the space more compact.

p { padding: 20px; }

The CSS above would give paragraph elements a padding of 20px.



In main.css, locate the .page-description class selector and set its padding to 30px.

Run your code to see that the paragraph element’s padding has increased on the webpage.

Folder Icon

Take this course for free

Already have an account?