The margin
property in CSS is used to create space around elements, outside of any defined borders. You can set margins for all sides at once, or individually for each side.
You can set the margin using the shorthand property or the individual properties:
Sets the margin for all four sides (top, right, bottom, and left) in one declaration:
Allows you to set the margin for each side separately:
Here are a few examples to illustrate different margin scenarios:
Feel free to use these margin properties to adjust the spacing around your elements! Let me know if you need more details or examples.