Final answer:
A nebula is mostly made of hydrogen and helium gas, which constitute about 99% of interstellar matter. These gases are fundamental components in the process of star formation and the life cycle of stars.
Step-by-step explanation:
A nebula is primarily made up of hydrogen and helium gas. These two elements collectively make up about 99% of the interstellar matter. Hydrogen, being the most abundant, is followed by helium, with other elements such as oxygen, carbon, and nitrogen present in much smaller quantities.
While other complex molecules and interstellar dust do exist in nebulae, the principal components remain hydrogen and helium. This composition is reflective of the early universe and the processes of stellar formation and destruction. For instance, a white dwarf is typically made of carbon and oxygen, and sometimes helium, whereas the materials ejected in a supernova explosion can result in either a neutron star or a black hole, distributing heavier elements into the surrounding space.