Answer
Liquids and solids: $g/cm^3$
Gas: $g/L$
Work Step by Step
That difference happens due to the fact that the density of gas is usually very small if represented in $g/cm^3$, in the order of $10^{-2}$ or $10^{-3}$. So, chemists use $g/L$ to be able to represent these numbers more easily.