A leaf consists of the following layers from top to bottom: cuticle, upper epidermis, palisade mesophyll, spongy mesophyll, lower epidermis, and pores called stomata. Stomata are pore-like openings found on the underside of leaves that allow gases like carbon dioxide, oxygen, and water vapor to diffuse in and out. They are surrounded by guard cells that open and close to regulate gas exchange and water loss from the leaf. Keeping stomata open all the time would cause excessive water loss, threatening plant survival.