Padding

Updated: 10/17/2017 by Computer Hope

Padding may refer to any of the following:

1. Padding is filling a field with pad characters. For example, if a name field required ten characters and your name was "Bob" (3 characters) the field would be "Bob0000000" where the 0's are the padding characters.

2. Padding is white space immediately surrounding an element or another object on a web page. The picture below helps demonstrate the difference between padding and a margin when working with CSS (cascading style sheets). As shown, the padding is in the border, and the margin is outside the border. For example, with a table cell, cellpadding can be added to the <table> tag to add white space around the text in a cell.

Example of margin, border, and padding.

Margin, Pad characters, Web design terms