Not just a property of liquid but of all matter. All matter expands when heated and contracts when cooled, in thermometers the liquid, usually an alcohol, expands when heated lengthening the little...
They really necessarily are not the same because air is a gas and obviously liquid is a liquid, and they have to be measured differently because you can tel a big difference in the two types of...