The atmosphere consists mainly of nitrogen (78%) and oxygen (21%), and also contains smaller amounts of water vapor, carbon dioxide, and ozone. It is held in place by Earth's gravitational force and is densest closest to the surface, decreasing in density with altitude. The atmosphere functions to provide oxygen for respiration, nitrogen for plant growth, carbon dioxide for photosynthesis, protection from UV radiation, and moderation of temperature ranges. Human activities such as burning fossil fuels and deforestation release greenhouse gases like carbon dioxide and methane that are absorbing more heat from the sun, increasing atmospheric temperatures and causing sea levels to rise as ice melts.