However, the strength of gravity depends on the planet's mass. Larger planets, like Jupiter, have a stronger gravitational pull than smaller planets, like Mercury.
So, while all planets attract objects, the strength of that attraction varies depending on the planet's size.