CodeLab
Tutorials For Everyone
Run
<!Doctype HTML> <html> <head> <title>CSS Padding Property</title> <style> .para1{border: 2px solid #3949ab; padding: 100px;} .para2{border: 2px solid #555555; padding-left: 100px;} </style> </head> <body> <h2>CSS Padding Property</h2> We can set the padding of an element by Css padding property. <p class="para1"> This paragraph has a padding of 100px on all sides; </p> <p class="para2"> This paragraph has a padding of 100px only on left side. </p> </body> </html>