Scientists claim to know what the sun is made of, but how exactly do they know this?
The short answer to how we know what the sun is made of is by a scientific method called spectroscopy.
Spectroscopy is the study of the interaction between matter and electromagnetic radiation. Visible light consists of a small part of the electromagnetic radiation spectrum, but it was first studied in-depth at the beginning of the nineteenth century by a scientist by the name of Hyde Wollaston. He concentrated sunlight rays and focused them through a crystal prism, which separated the various wavelengths into different colours of light. However, William Hyde Wollaston noticed something rather strange, he noticed that there were dark vertical lines in between the light spectrum. Little did William Hyde Wollaston know, he was on the verge of one of the greatest scientific discoveries of all time.
Quite a few years after William Hyde Wollaston noticed these peculiar black lines in the light spectrum, a German optician by the name of Joseph Von Fraunhofer, formulated a special scientific instrument titled a spectrometer, which was similar to the traditional prism method but allowed the sunlight to be dispersed more accurately and in better focus. What Joseph Von Fraunhofer found was even more of these strange black lines in the spectrum.
Over the years, scientists realized that those strange black lines in the spectrum were actually missing wavelengths. The colours were missing because the elements in and around the sun were actually absorbing those specific colours and wavelengths of light. Because of the exact placement of those missing wavelengths within the spectrum, scientists knew exactly which elements give off a certain wavelength. Therefore, if a colour was missing from sunlight, it meant that the sun consists of those elements.
So, based on the amazing spectroscopy method, scientists are able to state that the sun is made of mainly hydrogen and helium.