Here's a breakdown:
* Jupiter and Saturn: These are primarily composed of hydrogen and helium, with smaller amounts of methane, ammonia, and water. While their atmospheres are mostly gas, they have a deep, dense interior where the pressure and temperature are so extreme that the hydrogen and helium behave like a liquid metal. They also contain significant amounts of ice in their interior.
* Uranus and Neptune: These are often referred to as "ice giants" because they have a higher proportion of heavier elements like oxygen, carbon, nitrogen, and sulfur than the other outer planets. While still containing a gaseous atmosphere, they are believed to have a core of rock and ice surrounded by a thick mantle of water, methane, and ammonia ices.
So, in essence, all outer planets are made of both gas and ice. The distinction between "gas giant" and "ice giant" refers more to the relative proportion of these elements and their internal composition.