Difference Between Margin And Padding in Html Css margin is applied into outside of you element hence effecting how fare your elements is away from other elements . padding is apply to the inside of your elements hence effecting how far your elements content is away from the border.