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