Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to decide on using margin or padding in HTML?

Jeson84Jeson84 USAMember Posts: 90

Is there a recommended way to use margin and padding in different scenarios in HTML?

Tagged:

Comments

  • DavidMDavidM USAMember Posts: 342
    edited February 2014

    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

Sign In or Register to comment.