Padding, Border and Margin
Published in
Oct 30, 2022
Content — The box, where text and images appear
Padding — Clears an area around the content. The padding is transparent.
Border — A border that goes around the padding and content which can be coloured or transparent.
Margin — Clears an area outside the border. The margin is transparent.
PADDING
Padding defines the space between the elements.
MARGIN
Margin is the space around the elements.
margin-left:480px; margin-top:180px;
BORDER
A border goes around the padding and the content.
border: 5px solid rgb(69, 135, 209);
BORDER RADIUS:
Defines the radius of the border.
The below code shows how to use padding, border and margin.
Thank you for Reading!!