elibraryportal Logo

CSS Padding

CSS Padding property is used to create space between the border element and element content .

CSS Padding Properties

There are some property that is.

  • padding-left
  • padding-right
  • padding-top
  • padding-bottom
Property Description
padding It set the all padding properties in one declaration.
padding-left It set the left padding of an element.
padding-right It set the right padding of an element.
padding-top It set the top padding of an element.
padding-bottom It set the bottom padding of an element.

CSS Padding Values

Value Description
length It is used to define fixed padding in pt, px, em etc.
% It is used to defines padding in % of containing element.

CSS Padding Example

Test it Now


This is a paragraph with no specified padding.

This is a paragraph with specified paddings.