Astronomical spectroscopy

Astronomical spectroscopy is the science of using spectroscopy to figure out what elements astronomical bodies, such as stars, planets and nebulae, are made of. It can also be used to work out how those objects are moving, using doppler shift.
The study of spectroscopy and spectra is used in astronomy to help scientists study the whole spectrum of electromagnetic radiation, including visible light, which radiates from stars and other hot celestial objects. Spectroscopy can be used to find properties of distant stars and galaxies. It can find out their chemical composition, temperature, density, mass, distance, luminosity, and relative motion using doppler effect measurements.
Chemical properties of stars.
Isaac Newton used a prism to split white light into a spectrum of color, and Fraunhofer's high-quality prisms allowed scientists to see dark lines of an unknown origin.
It was not until the 1850s that Gustav Kirchoff and Robert Bunsen explained the dark lines. Hot solid objects produce light with a continuous spectrum, and hot gasses emit light at specific wavelengths. However, hot solid objects surrounded by cooler gasses show a near-continuous spectrum with "dark lines corresponding to the emission lines of the gasses". By comparing the absorption lines of the
Sun with emission spectra of known gasses, the chemical composition of stars can be discovered.