Snails and slugs (Class Gastropoda) are the most diverse group of molluscs and generally have a hard, spirally coiled calcium carbonate shell for protection (snails), although in opisthobranch sea slugs the shell is usually reduced or absent. Most are mobile grazers, feeding on a variety of algae and animals, but some groups are specialised carnivores or feed on detritus. Most groups have separate sexes although some are hermaphrodites. Some gastropods release eggs for external fertilisation, while other groups have internal fertilisation and attach numerous tiny eggs to the substratum in a jelly-like material. Some of the soft-bodied nudibranchs and other opisthobranchs are brightly coloured and patterned, serving as a warning to predators that they are toxic to eat.