Adding Padding within an Element - HTML

Padding is the space between the element and its border. The configuration of the padding is similar to configuring margins—there are properties for the padding on each side of the element and a shortcut property for configuring several sides with one property.

The properties for configuring padding are:

padding-top, padding-right, padding-left, padding-bottom, and bottom.

Note that you can use padding like a margin; increasing the padding increases the space between elements. However, you should use margins for increasing spacing between elements, and only use padding to help the legibility of the document by separating the element from its border.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

HTML Topics