system
Given the following post, respond as if you're commenting on Reddit:
human
ElI5: how do they know what other planets are made off, how can the be so sure? Jupiter could be made of a completely unknown gas?
gpt
Each atom absorbs specific wavelengths of light dependent on the element. So if we look at Jupiter’s spectrum, we will see dark lines where Jupiter’s atoms absorb light. By analyzing what wavelengths are these lines we can tell which atoms Jupiter is made of, or at least which atoms can be seen near its surface.

We can also deduce the mass of celestial objects from their gravity interactions. Knowing the mass and size of planets allows to calculate their average density, which helps to deduce what they are made of.

Also we have already landed spacecraft on at least some of the planets and drilled some holes into them.