CodeLab
Tutorials For Everyone
Run
<!Doctype HTML> <html> <head> <title>CSS Padding for individual sides</title> <style> .para{ padding-left: 50px; padding-top: 0px; padding-right:100px; padding-bottom: 20px; background: #3949ab; color: #fff; } </style> </head> <body> <h2>CSS Padding for individual sides</h2> We can set the padding of an element of each side separately as follows. <p class="para"> This paragraph element has padding values as padding-left: 50px;, padding-top: 0px;, padding-right:100px; and padding-bottom: 20px; </p> </body> </html>