The outline
property helps us visualize
how large or small is an element in our
design.
Let's look at an example:
In the above example, a padding-top
of 20px
was added to the <ul>
element for spacing.
But, it's not clear whether this padding was
included within the element's dimensions or
applied outside.
To understand this, let's add an outline
to the <ul>
element and observe its effect.
In the above example, we applied a
1px solid tomato
outline to the <ul>
element.
This outline helps us visualize the dimensions
of the <ul>
element and understand where
the 20px padding was added.