Tides are affected by

AEarth's gravity alone.
Bthe Moon's gravity alone.
Cthe Sun's gravity alone.
Dthe gravity of the Moon and the Sun.