Throughout the dinosaur era, communities of dinosaurs were made up of plant-eaters (herbivores) and meat-eaters (carnivores). Different dinosaurs had different feeding habits. Giant herbivorous dinosaurs, such as the sauropods, munched high in the treetops. Smaller plant-eaters were well adapted for chomping on lower-level plants, or grazing on ground cover. Large predators, and medium-sized pack hunters, tended to eat the meat of other dinosaurs. Smaller meat-eaters ate animals such as lizards, and insects.
Not only was the 40-tonne Barosaurus one of the heaviest sauropods of the Jurassic Period, it had one of the longest necks of any dinosaur. A fully grown adult measured about 27 m (89 ft) from nose to tail. Its neck accounted for one-third of its length. Why such a long neck? It is thought that Barosaurus stretched up to leaves that were out of reach of shorter-necked plant-eaters.
Barosaurus had short front legs and longer back legs. This meant there was less weight at the front its body, so it may have been able to rock back on its hind legs, lifting its lightweight front legs off the ground to reach up to plants growing 15 m (49 ft) above the ground. It could have used its tail to support it in this stretching position. Barosaurus could not have remained upright for very long as its bones and muscles would have been under considerable strain.
Triceratops lived about 70 million years ago, at the end of the Cretaceous Period. It ate the new flowering plants that first appeared at this time, such as magnolia, oak, and laurel. Triceratops used its sharp beak to snip off leaves, twigs, and bark, and could reach food that grew up to 3 m (9 ft) from the ground. Only taller plants were safe from its giant appetite. It lived in herds, and grazed in forests and along the edges of rivers and swamps.
Heterodontosaurus had three kinds of teeth. Incisors at the front of the top jaw were used for cutting. Tusk-like teeth may have been used for defence. Chisel-like teeth were for shredding food plants.
Edmontosaurus had a broad snout for gathering up big mouthfuls of different kinds of vegetation. It used its toothless beak for cropping, and its cheek teeth for cutting up and chewing food.
Any animal community has food chains of predators and prey. Interlinked chains form a food web. This diagram shows who ate whom in Late Cretaceous western North America. Arrows point to the predator. The top predators were the tyrannosaurs, but all dinosaurs ultimately depended on plants.