A planet must have a large mass and low density in order to be classified as a gas giant. Gas giants are composed primarily of hydrogen and helium, with relatively small amounts of other elements. They are much larger than terrestrial planets, such as Earth, and have much lower densities. This is because the majority of their mass is made up of low-density gases, rather than solid or liquid materials. They are also known as Jovian planets, because Jupiter is the prototype of this type of planet.