Natural gas is a fossil fuel formed when layers of buried plants, gases, and animals are exposed to intense heat and pressure over thousands of years. The energy that the plants originally obtained from the sun is stored in the form of chemical bonds in natural gas. Natural gas is a nonrenewable resource because it cannot be replenished on a human time frame. Natural gas is a hydrocarbon gas mixture consisting primarily of methane, but commonly includes varying amounts of other higher alkanes and even a lesser percentage of carbon dioxide, nitrogen, and hydrogen sulfide. Natural gas is an energy source often used for heating, cooking, and electricity generation. It is also used as fuel for vehicles.