Cestoda is a class of parasitic worms in the flatworm phylum (Platyhelminthes). Most of the species—and the best-known—are those in the subclass Eucestoda; they are ribbon-like worms as adults, known as tapeworms. Their bodies consist of many similar units known as proglottids—essentially packages of eggs which are regularly shed into the environment to infect other organisms. Species of the other subclass, Cestodaria, are mainly fish infecting parasites.
All cestodes are parasitic; many have complex life histories, including a stage in a definitive (main) host in which the adults grow and reproduce, often for years, and one or two intermediate stages in which the larvae develop in other hosts. Typically the adults live in the digestive tracts of vertebrates, while the larvae often live in the bodies of other animals, either vertebrates or invertebrates. For example, Diphyllobothrium has at least two intermediate hosts, a crustacean and then one or more freshwater fish; its definitive host is a mammal. Some cestodes are host-specific, while others are parasites of a wide variety of hosts. Some six thousand species have been described; probably all vertebrates can host at least one species.
The adult tapeworm has a scolex (head), a short neck, and a strobila (segmented body) formed of proglottids. Tapeworms anchor themselves to the inside of the intestine of their host using their scolex, which typically has hooks, suckers, or both. They have no mouth, but absorb nutrients directly from the host's gut. The neck continually produces proglottids, each one containing a reproductive tract; mature proglottids are full of eggs, and fall off to leave the host, either passively in the feces or actively moving. All tapeworms are hermaphrodites, with each individual having both male and female reproductive organs.
Humans are subject to infection by several species of tapeworms if they eat undercooked meat such as pork (Taenia solium), beef (T. saginata), and fish (Diphyllobothrium), or if they live in, or eat food prepared in, conditions of poor hygiene (Hymenolepis or Echinococcus species). The unproven concept of using tapeworms as a slimming aid has been touted since around 1900.