Home
CSS
CSS Margins
Tryit: Margin shorthand property - 1 value
Run ❯
Get your
own
website
Result Size:
625 x 534
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <style> div { border: 1px solid black; margin: 25px; background-color: lightblue; } </style> </head> <body> <h2>The margin shorthand property - 1 value</h2> <div>This div element has a top, bottom, left, and right margin of 25px.</div> <hr> </body> </html>