While Galileo's invention was a rudimentary device called a "thermoscope", it was the first to use the expansion and contraction of a substance (air in his case) to indicate temperature changes.
However, Santorio Santorio, a Venetian physician, is credited with the first practical thermometer in the early 17th century. He modified Galileo's thermoscope by adding a scale for measuring temperature.
Later, Ferdinand II, Grand Duke of Tuscany, developed the first sealed liquid-in-glass thermometer using alcohol in 1654.
It wasn't until the 18th century that Anders Celsius and Daniel Gabriel Fahrenheit developed the temperature scales we use today.