Most corals feed on phytoplankton, which are plants and algae that flow through the water. Invertebrate larvae, decomposing organic matter and floating plankton are also common food sources. Bacteria from dead plant matter, mucus and other various sources is eaten by corals, and some large corals eat small fish.
The majority of corals' nutrients are derived from sunlight during the day. Corals are nocturnal creatures, and they feed at night. Many corals use organs called nemotocysts to eject threads that capture prey and bring them back to the tentacles. Some corals send out mucus strands to collect dissolved or decomposing organic material in the area. Certain species of reef-building corals can extend filaments from their stomach cavities, allowing them catch and digest small sea creatures. Corals that live in colonies are able to pass food between each other, sharing nutrients.
In captivity, zooxanthellae algae is an important staple food for corals. Additionally, many corals feed on standard fish food, selecting what they prefer and leaving undesired food. Some other common foods fed to tank corals are mysis shrimp, brine shrimp, amphipods and copepods. This diet can be supplemented with clams, thawed plankton, phytoplankton, krill, squid, shrimp and fish pieces. It is important to avoid feeding corals too much food, as this can increase nitrate levels.