If stars are so far away, then how do we know what they're made of? It's absorption spectrum! Even our closest star, the Sun, is way too hot to take a sample, so we have to rely on what the light can tell us.