<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Padding for All Sides At Once</title> <style> h1 { padding: 45px; /* apply to all four sides */ } p { padding: 35px 65px; /* vertical | horizontal */ } div { padding: 30px 45px 65px; /* top | horizontal | bottom */ } pre { padding: 30px 45px 35px 110px; /* top | right | bottom | left */ } h1, p, div, pre { background: pink; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a frist paragraph..</p> <div>This is a second paragraph..</div> <pre>This is a important paragraph..</pre> <p><strong>Note:</strong> This is a last a paragraph..</p> </body> </html>