Abakada CSS Demo: margin and padding


This example shows the effects of using the CSS margin and padding style attributes.

Margin affects the space oustide this box, while padding affects the space inside this box.
Enter different margin and padding values, and select a unit value from the options below.
Note the resulting CSS syntax for the style declaration.

Enter amount of Margin Unit
Enter amount of Padding Unit

NOTE: margin and padding shorthand notation apply to all ( top, right, bottom, and left ) sides of an object.
margin and padding default to pixel ( px ) values if no length unit is specified.


View Source   Exit

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.