Here's a breakdown:
* Jupiter and Saturn: These are mostly made of hydrogen and helium, similar to the Sun. They have small, rocky cores, but the vast majority of their mass is gas.
* Uranus and Neptune: These are referred to as "ice giants" because, in addition to hydrogen and helium, they also have significant amounts of ices like water, ammonia, and methane. They also have smaller, rocky cores.
While they do have some rocky material, it's a tiny fraction compared to their overall size. They are considered gas giants because their atmospheres are so vast and dominant.