Density is the mass of a substance per unit volume. The density of water is 1 gram per milliliter. Substances with densities above 1 gram per milliliter sink in water, while substances with densities below 1 gram per milliliter float.
At standard temperature and pressure, osmium and iridium are the densest elements. Hydrogen gas has the lowest density. Because the volume of a gas depends on temperature and pressure, the density of a gas also depends on temperature and pressure. Density is determined by mass, not weight; therefore, the density of a substance does not change with gravity. An object on the moon weighs less than on Earth, but it has the same density.