In css the default for margin-left is 0. I understand that no units are required since it is 0. Does not matter if it is em or px. But I have inherited code in my company that states:
margin-left: 10;
I am guessing that this would mean 10px by default? I guess I can try both em and px and see when one looks better.
There is no default unit.
The CSS is invalid, as the non-zero value doesn’t have a unit.
Browsers will handle the incorrect code in different ways depending on what browsers it is, and in what mode the page is rendered. In quirks mode (without a doctype), most browsers will try to correct the code by using the unit
px. In standards compliance mode (with a proper doctype), most browsers will ignore the style.