Mercury is toxic, and it is very difficult to dispose it when the thermometer breaks. So, nowadays digital thermometers are used to measure the temperature. Digital thermometers are different because they use a computer chip/heat sensor to tell the temperature instead of mercury. When the body whose temperature is to be measured is brought in contact with the thermometer, it recieves heat until it comes at a temperature equal to the temperature of the hot body. The sensor/chip within reads the temperature and displays the same on a small screen.