Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS padding property</title> <style> p { background: #f0e68c; } p.one { padding: 20px; } p.two { padding: 35px 15px; } p.three { padding: 20px 100px 50px; } p.four { padding: 10px 30px 50px 150px; } </style> </head> <body> <p>This is a normal paragraph.</p> <p class="one">This paragraph has equal padding of 20px on all sides.</p> <p class="two">This paragraph has a top and bottom padding of 35px and a left and right padding of 15px.</p> <p class="three">This paragraph has a top padding of 20px, left and right padding of 100px and a bottom padding of 50px.</p> <p class="four">This paragraph has a top padding of 10px, right padding of 30px, bottom padding of 50px and a left padding of 150px.</p> </body> </html>