A milliliter is a measurement of volume, while a gram is a measurement of mass. Therefore, it is impossible to convert between the two measures without additional information. However, one can determine the mass if the density of the substance in question is known.
In order to convert from 10 milliliters to grams when the density is known, one would multiply 10 by the density, which is typically expressed as kilograms per cubic meter. The result is then divided by 1,000 to determine the number of grams that 10 milliliters is equal to. Pure water at 4 degrees Celsius has a density of 999.9720 kilograms per cubic meter, which means 10 milliliters of water would equal almost exactly 10 grams.