The dietary habits of fish differ from one species to another but, in general, some species are specifically herbivorous or carnivorous, preferring either marine plants or animals, respectively. Others are omnivorous in nature, feeding on both.
There is no general rule on what the different ocean fish tend to eat, since they have different feeding habits. However, most of the ocean fish usually eat each other, as well as crustaceans such as shrimp, krill and crabs. Ocean fish also eat kelp, algae, detritus and plankton, as well as cephalopods such as squid and octopus and also echinoderms such as sea urchins. Some ocean fish are scavengers and feed on the carcasses of other marine animals.
The diet of fish from deep waters has great diversity since some of these fish are omnivores and feed on aquatic animals, including crustaceans, worms and smaller fish. For example, the whale shark is the largest fish in the ocean. It eats plankton, squid and other small marine animals. It swims with its enormous mouth open and filters the food with its gills. The great white shark hunts large prey, including other sharks. It is famous for even attacking humans, though humans are not its primary prey. The shark launches a violent attack, withdraws while the injured animal weakens, then returns to eat with little resistance.