This diagram shows a cutaway of a gas and an electric water heater. Once provided with fuel or another power source, the tank heats the water for use throughout the home. In an electric water heater, the water is heated by two elements, each with their own thermostats, whereas a gas heater raises the water temperature through a burner assembly. Common items include the drain valve, the cold-water inlet, a sacrificial anode rod that prevents tank wear, a dip tube, and a pressure relief valve.