What is density?
Density is a characteristic property of a substance. • The density of a substance is the relationship between the mass of the substance and how much space it takes up (volume).
Specific gravity is a unitless measurement. Density equals the mass of the substance divided by its volume; D = m/v.
Density measurement gives useful information about composition, the concentration of chemicals or of solids in suspension.
Density can be measured in a number of similar ways to level:
 Hydrostatic pressure
 Radiation
 Vibration
 Differential pressure
Density can be also derived from Coriolis mass flowmeter output.
Hydrostatic pressure:
For an equal volume of liquid, the pressure will be same.
As mentioned, for an equal volume the pressure will be constant. The liquid filled in the tank shown in above picture, the height of the liquid level is maintained at a constant level so that the volume of the liquid in the tank is constant. Now in the pressure change to the liquid is measured, because any pressure change is the measure of the density change in the liquid column.
Radiation:
Density measurement by radiation is based on the increased absorption of gamma radiation for an increase in specific gravity of the material being measured. The main components of such a system are a constant gamma source (usually radium) and a detector. Variations in radiation passing through a fixed volume of flowing liquid is converted into a proportional electrical signal by the detector.
Vibration:
Damping of a vibrating object in a fluid will increase as the density of the fluid increases. An object is vibrated from an external energy source. The object may be an immersed reed or plate.
Density is measured by one of two procedures:

Changes in the natural frequency of vibration can be measured when the object is energised constantly.

Changes in the amplitude of vibration can be measured when the object is struck periodically, like a bell.
Differential Pressure:
Hydrostatic pressure measurement cannot be used where constant overflow tanks. So the differential pressure is measured from two points from a fixed known distance apart.
However applications with level or static pressure variations require compensation.
Temperature Effects:
Increases in temperature cause expansion of a liquid, altering its density. Not all liquids expand at the same rate. A specific gravity measurement must be corrected for temperature effects in order to be completely accurate in terms of reference conditions for density and concentration, In applications where specific gravity is extremely critical, it is possible to control the temperature to a constant value. The necessary correction to the base temperature can then be included in the density instrument calibration.
Hey check this Humidity measuring devices