Is there a recommended way to use margin and padding in different scenarios in HTML?
From w3 Schools,
Explanation of the different parts:
Margin - Clears an area around the border. The margin does not have a background color, it is completely transparent Border - A border that goes around the padding and content. The border is inherited from the color property of the box Padding - Clears an area around the content. The padding is affected by the background color of the box Content - The content of the box, where text and images appear
Margin - Clears an area around the border. The margin does not have a background color, it is completely transparent
Border - A border that goes around the padding and content. The border is inherited from the color property of the box
Padding - Clears an area around the content. The padding is affected by the background color of the box
Content - The content of the box, where text and images appear
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
From w3 Schools,
Explanation of the different parts: