Gas water heaters are the most common type of water heaters in residential settings. Gas gets the tank up to temperature about twice as fast as electrics do, and costs less than half what it takes for an electric water heater to produce the same amount of hot water.
Gas water heaters are less efficient than electric heaters, but electricity is much more expensive.
The tank should be firmly affixed to a structure such as the wall in earthquake prone areas to prevent a potential gas fire if the tank falls over and breaks the gas connection.
TPR Valve is a safety device for the water heater
Storage type units that have a tank have a TPR valve (and so do electrics). Some times tankless units have TPR valves, and sometimes they don't.
The TPR valve (Temperature Pressure Relief) also known as a T&P valve, pop-off valve, or just relief valve, is a safety device on gas water heaters that releases pressure from the tank if the pressure or temperature reach unsafe levels.
The TPR valve is usually mounted on the top of the tank, but can sometimes be mounted on the side of the tank.
A manual release lever located on the relief valve. According to most manufacturers elief valves should be periodically tested by lifting the manual release lever at least once a year.
Due to the scalding potential of the discharge from the T&P valve, the outlet from the valve should be piped to a safe area. Typically they are piped down to within 6 inches of the floor or even outside of the dwelling at near ground level. Check with your local building department for local building code requirements related to the relief valve discharge plumbing.