The main component of the sun is hydrogen and helium. There are a number of other elements that have been detected in the solar spectrum (which is what is used to guess what’s in the sun, as we can’t really go and check by taking a sample of the sun) and these are detailed here:
Comments