Crabs actually smell their food through the antennae, which sense certain chemicals in the water. These chemical sensors are also found on the mouth parts and on the legs.
One ocean crab that has been extensively studied and harvested is the Dungeness crab found off the coast of Washington State in the USA. Examination of its stomach contents found fish, clams and other crabs.
Stomach contents in Dungeness crabs also confirm that they are cannibalistic. This has also been observed in a laboratory setting where newly molted crabs in the same aquarium have been eaten.
North Atlantic crabs are primarily carnivores preferring snails, mussels and other shellfish. They also have a preference for brittle stars, an animal related to the starfish that detaches a leg when touched, hence the name.
The Horseshoe crab finds its food, usually clams and worms, as it makes its way across the ocean floor. If a meal is found, one of the front two claws, called chelicerae, picks it up and moves the item to the crab's mouth.
Coral crabs, found in tropical waters, feed on the tiny creatures that make the coral, the polyps.