There is no gravity in space.
Don’t believe that!
An astronaut leaves the orbiting space shuttle and floats weightlessly through space, unencumbered by gravity… we’ve all seen this in both NASA videos and Hollywood blockbusters. The impression is however, quite misleading. The astronaut is still very much subject to gravity; in fact, at a typical space shuttle orbiting height of about 250 miles, gravity is reduced by only 10%! The first clue is that the spacecraft he departed from is orbiting the earth – this orbit would not be possible without gravity. The shuttle is in fact falling toward the earth, as is the astronaut. The astronaut’s weightlessness is little different from a skydiver in free fall. An orbit is sort of a “sideways fall” that follows the curvature of the planet – there is a bit of decay with each pass (satellites eventually crash back down to earth) but orbiting objects can remain aloft for a very long time.
Gravity does get weaker with distance from a massive body. But, to add further perspective to the 250-mile example, above, the earth still has enough gravitational pull to keep the moon in orbit at a distance of over 200,000 miles.
Every star, planet, etc. in the universe exerts a gravitational force that, while weak at great distances, is never zero.