When working with different types of elements, we notice something interesting. Elements like the div
and p
always start on a new line, and stretch to completely fit in the available width. But elements like span
and a
do not create a new line and only take up as much space as needed.
This behaviour is set by the elements' display
property.