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