Marginocephalia
Marginocephalia (/mär′jə-nō-sə-făl′ē-ən/ Latin: margin-head) is a clade of ornithischian dinosaurs that is characterized by a bony shelf or margin at the back of the skull. These fringes were likely used for display. There are two clades included in Marginocephalia: the thick-skulled Pachycephalosauria and the horned Ceratopsia. All members of Marginocephalia were primarily herbivores. They basally used gastroliths to aid in digestion of tough plant matter until they convergently evolved tooth batteries in Neoceratopsia (or "new Ceratopsia") and Pachycephalosauria. Marginocephalia first evolved in the Jurassic Period and became more common in the Cretaceous. They are basally small facultative quadrupeds while derived members of the group are large obligate quadrupeds. Primitive marginocephalians are found in Asia, but the group migrated upwards into North America. Pachycephalosaurs, or "thick-headed reptiles", have primitive features that include basally small sized bodies, obligate bipedalism, and simple teeth with one row in operation at a time that are replaced as they are worn down. As they evolved, pachycephalosaurs evolved much thicker and advanced skull roofs including dome forms with horn-like ornamentation. Some research suggests these domes were used like helmets for protection while head-butting members in intraspecific combat. Some research suggests their necks were not strong enough to support such an impact. Flat-headed pachycephalosaur specimens have been found in Asia, and there is great controversy on the meaning of these flat heads. Recent research suggests the flat heads could be a juvenile state before developing the dome shape in the adult stage. It could also be evidence of sexual dimorphism with the female being more flat-headed. Ceratopsians, or "horned-faces", differ from pachycephalosaurs in the presence of a rostral bone, or beak. They are also known for having a jugal horn and a thin parietal-squamosal shelf that extends back and up into a frill. This frill could have been used for anchoring jaw muscles, as well as for display. The horns were likely used for establishing dominance, or defending territories. It is also possible they were a factor in sexual display and species recognition. One of the basalmost members of this group is Psittacosaurus, which is one of the most species-rich dinosaur genera from Asia. Ceratopsians later evolved into very large quadrupeds with elaborate facial horns such as Triceratops, Styracosaurus, and Centrosaurus. There was no change in richness of species throughout the Cretaceous before the Cretaceous-Paleogene extinction. Feeding 
Marginocephalians have simple, peg-like teeth surrounded by rhamphotheca, a horny sheath of keratin. The teeth are arranged in batteries for easy replacement and have serrations which may have been useful for cutting up vegetation. Marginocephalia evolved several methods for breaking down vegetation. Pachycephalosaurs had especially large abdomens with broad girths and elongate sacral ribs suggesting the presence of a large stomach. This is presumed to have been useful for breaking down tough vegetation through bacterial fermentation. Another adaptation for advanced vegetation digestion is seen in Ceratopsians, which evolved features to improve their chewing apparatus. Derived ceratopsians have vertical grinding surfaces on their teeth to maximize break-down of tough vegetation. There is also evidence of advanced adductor musculature that extends from a large coronoid process on the mandible up to the ceratopsian frill, which would increase chewing force. Pachycephalosaurs had gastroliths to help in digestion of food, but only primitive ceratopsians, such as Psittacosaurus, have been found to have gastroliths. Margins and social behavior 
Marginocephalian remains reveal significant evidence of being social creatures, much of which is related to the many possible functions of the bony skull margins. Some possible functions of the variably shaped and sized margins are to ward off predators, display, ritualized combat, defense of territory, or establishing social ordering. Both pachycephalosaurs and ceratopsians show evidence of interspecific communication, and there may be evidence of intraspecific communication. Pachycephalosaurs, with their dome-shaped heads, are commonly thought to have used their thick skulls for butting into each other. Their brains and vertebrae are positioned in ways to protect from the impact of head-butting. Also, the columnar structure found in bone remains is consistent with models used to recreate the practice of head-butting. However, some pachycephalosaurs such as Stygimoloch have vascularization in the skull cap that would not have supported head-butting behavior. Thus, the heads could have been used as ornamentation or to butt into the softer flank of other pachycephalosaurs for intraspecific communication or as a form of agonistic behavior. The frills of ceratopsians are incredibly diverse. They may have been used for protective purposes as the frill sometimes splays over the neck. However, some say that the frill would have provided little protection from other large dinosaurs such as Tyrannosaurus. Other possible functions include intraspecific communication for mating purposes or as a visual display of territorial protection, as seen in many common day organisms such as red-breasted robins. The frills also could have been used for species recognition purposes, as they seem to develop fairly early in life. There has also been evidence that ceratopsians care for their young, as bone-beds have been found of adult individuals with a nest of juveniles, although some refute this as viable evidence of care for young. There have also been bone-beds found with hundreds of adult ceratopsians, indicating herd activity. A few specimens have been found with puncture wounds, supporting the use of horns as protective or combative weapons. Other research examining juvenile ceratopsians reveals a change in horn morphology over time, suggesting frills and horns could have been used for intraspecific communication of age. Horns also could have been used for thermoregulation as indicated by isotope analysis, as aid in knocking down vegetation, or for horn-locking agonistic behavior. Sexual dimorphism 
The study of sexual dimorphism in dinosaurs is incredibly difficult. The varying size and intricacy of margins in Marginocephalia have shown many signs of sexual dimorphism. Although the intricate frills of marginocephalians sometimes seem to present with dimorphic features, many doubt the validity of these claims. Stegoceras validum, a pachycephalosaur, can be segregated into two groups based on the size and shape of their skulls. These two group classifications separated the species population in half, which is highly indicative of sexual dimorphism. However, some report that the two groups may actually represent two separate species. Protoceratops, a type of ceratopsian, also shows signs of sexual dimorphism. However, their frills don't seem to develop until later in life, and may be coordinated with sexual maturity. Locomotion 
In general, primitive marginocephalians were bipedal or facultative quadrupedal, and derived individuals were obligate quadrupedal. This is especially prominent in Ceratopsia, where only the primitive Psittacosaurus is bipedal. All the derived forms were strong quadrupeds, although their stance is controversial. Some think they were fairly columnar, with front limbs erect under the body, which would have been more efficient for speed. Others think the legs were more sprawling, as evidenced by the shape of the forelimb bones. Although not as fast, this posture would have been efficient for grazing vegetation on the ground. Less is known about bipedal pachycephalosaur locomotion, although they must have had a fairly broad girth in order to make room for their enlarged gut. Classification
The cladogram below follows a 2009 analysis by Zheng and colleagues. Cladogram after Butler et al., 2011. References

 
Kimmeridgian first appearances
Maastrichtian extinctions
Taxa named by Paul Sereno