Margin is the space between elements, similarly to padding it allows you to create spacing around elements, ensuring proper alignment, readability, and visual balance within a layout.
auto
value for left and right margins. For left or right aligned elements, it will assume a margin of 0
on the side that it is aligned to, and an auto
value for the opposite side.
⌥ Option
or Alt
key to equally change margin on both sides of an element. Hold ⇧ Shift + ⌥ Option
or Alt
to equally change margin for all sides.