View video tutorial

CSS Padding

CSS

Define the space between the element content and element boundary.

CSS Padding

Padding is used to define space around the content of an element.

Example

.p1 {
  padding: 25px;
}
Try it Now »

Click on the "Try it Now" button to see how it works.


Sample Code

Copy each file contents and paste it to your own project and run to see the final output

Example

.p1 {
  padding: 25px 50px;
}
Try it Now »

Click on the "Try it Now" button to see how it works.