Ships are surprisingly vulnerable to tanks when they come close to shore. From personal experience in full combined arms custom matches, you need a high-arc, direct High Explosive hit to the roof of the turret or hull with a 120mm+ gun from a ship to destroy most medium and larger tanks in the game. And that’s IF said tank stays still long enough for you to land the hit should you be 5-30km out.
Getting closer than 3-4km to use fast, accurate shelling is dangerous for anything but heavy cruisers and battleships because the hulls and turrets of everything else just don’t have the armor. And even with the heaviest armored ships, you don’t have the fire rate or ability to direct each high-caliber gun onto a different target in order to pin-point apply AP or HE shells through the weak points of various tanks, while they can pummel your turrets, bridge, engines, or obliterate your crew with impunity.

