Interactive online courses HTML Academy
2026-03-09 12:56 Diff

To make the text more readable, we must ensure that there is enough free space in the block for this text. There must be enough space around the text. It should not touch the edges, and it should not be crowded.

Two properties are responsible for margins in CSS: padding sets the padding in the block, and margin sets the external margins. Here is an example of how to use them:

p { padding: 10px; margin: 20px 0; }

In the example above, padding of 10px is specified for all sides. In addition, external top and bottom margins of 20px as well as left and right margins of 0px are specified. These are shorthand properties.

Look at the aside block on our website. The margins for this block are clearly insufficient. Let’s add them!