CSS padding property syntax and examples

The CSS padding feature is a feature of CSS1 that is used to set the margins of the content of HTML elements.

The padding values of the elements are zero by default. For example, if the padding attribute of a paragraph element is not assigned a value, it may appear adjacent to other visual content since the inside margins are zero. The padding-top, padding-right, padding-bottom and padding-left properties can also be used to avoid this situation.

The CSS padding feature can be applied to all html elements except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column.

Continue Reading

CSS margin property syntax and examples

CSS margin property the values of the outer edge of an element. The margin-top, margin-right, margin-bottom, and margin-left properties are used to set the margins separately.


css margin property


The margin property can be applied to all elements except the elements of the table type.

Continue Reading