CSS padding-left property

The padding-left specifies the left padding of an element. It sets the left padding of an element. This can take a value in terms of length of %. 

Example

<html>
   <head>
   </head>
   <body>
      <p style = "padding-left: 10px; border:1px solid blue;">
         This is a paragraph with a specified left padding
      </p>
      <p style = "padding-left: 10%; border:1px solid blue;">
         This is another paragraph with a specified left padding in percent
      </p>
   </body>
</html>
Updated on: 2020-03-04T11:06:01+05:30

114 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements