Margins are used to create space around elements, outside of any defined borders. CSS has margin properties for each side: top, right, bottom, left.
auto - Center the element horizontallypx / em / % - Fixed/relative marginmargin: top right bottom leftmargin: top-bottom left-rightMargin Collapse: Top and bottom margins of adjacent elements collapse into a single margin.
Edit the code below and click Run to see the result live.