Mercury, Venus, Earth and Mars are called "rocky" or "terrestrial" planets. They are similar to Earth in composition. Heat from the Sun evaporated lightweight elements like hydrogen and helium into interplanetary space. Mostly rock and metal was left in this zone and clumped together to form the inner rocky planets.
HubbleSite and STScI are not responsible for content found outside of hubblesite.org and stsci.edu