|A horse skull|
Strictly speaking, most won't absolutely refuse to eat animal matter. For one thing, if you're munching down on leaves, you're going to eat the odd insect now and then, if only by accident. And most mammalian herbivores will, in reality, eat the occasional bit of - mostly invertebrate - flesh, or tuck into things like eggs if they find them lying around. But these are a minor part of their diet at best, allowing us to draw a useful, if hazy, line between them and true omnivores.
The largest order of mammals are the rodents. While many are genuinely omnivorous, most use their great gnawing teeth to feed on things like nuts and hard seeds. This illustrates one of the problems with herbivory: while your food might be easy to catch, it's not necessarily very easy to eat. Many wild plants are hard or thorny, and they're often not as packed with nutrients as meat is. As a result, herbivores usually spend a lot of their time feeding, and they require special adaptations to make the most of their meals.
One exception to this is fruit. Seeds need plenty of nutrients in order to nourish the sprouting plant, and many fruits have evolved specifically to be eaten, packing a hard, indigestible, seed inside a tasty ready-to-eat package. So long as the seeds can survive their passage through the herbivore's gut, the animal can carry them to a new place, ready to germinate from their dung.
Because of this, a number of mammals have evolved to feed mainly on fruit. Compared with other plant matter, it's often easy to eat, and highly nutritious. A downside is that, especially in more temperate climes, it isn't available at all seasons of the year, although flowers and young leaves can be nearly as good, and make a suitable substitute when fruit isn't available. Small fruit, such as berries, may be close to the ground where almost anything can get at it, but often, fruit is up in high trees, and fruit-eating mammals are often the sort for which height is no obstacle - primates or bats. Some bats (and one weird marsupial) have gone so far as to feed mainly on nectar and pollen, which hardly need digesting at all.
Perhaps the most readily apparent herbivores among the placental mammals, however, are the ungulates. Not all large herbivorous mammals are ungulates, even if we ignore, say, gorillas and other large primates. Elephants and manatees aren't, for example, although they are sometimes called "subungulates" because of their similarity. There are also, of course, many herbivorous marsupials, such as kangaroos, wombats, and koalas, which certainly aren't ungulates. But still, ungulates, including such animals as deer, antelope, and horses, are obvious, and plentiful, examples of mammalian herbivory.
Odd-toed Carnivorans Bats
^ ^ ^
| | | Even-toed
| | | Ungulates
--------------- | ^
| | | Shrews &
| | | Hedgehogs
------------------- | ^
| | |
| | |
As the above shows, the two kinds of living ungulate are not necessarily very closely related. "Subungulates" are even further away, belonging to an entirely separate branch of the placental family tree. I should also point out that the exact details of the above are not without some controversy, although it's broadly agreed that the groups shown are related to one another somehow, and descend from a single northern hemisphere ancestor. But it does seem to be quite hard to disentangle the relationships between mammals at this broad level.
The word "ungulate" comes from the Latin ungula, meaning "hoof", and most ungulate species do, indeed, have hooves. Exceptions include camels, which need broad flat toes to stop themselves sinking into soft sand, and the semi-aquatic hippos. Hooves are thought to be an adaptation to running fast, allowing the animal to escape from predators, and if they didn't need claws to rip into flesh, it's plausible that fast-running carnivores would have them, too. Grazing marsupials never evolved hooves (probably for good reason), although kangaroos have certainly done their best without them.
Useful though hooves are, they aren't directly related to herbivorous habits. For that, you need modifications to the digestive system. Herbivores that don't feed primarily on seeds and fruit usually need to ferment their food somehow in order to digest it, and I've discussed some different strategies for doing that before. But, if you want to know whether a fossil belongs to a herbivorous animal, the shape of the stomach and colon isn't going to be much help.
|A moose skull|
(presumably a female, unless they've taken the antlers off)
The early mammals had four kinds of teeth, a pattern that most living forms retain to a greater or lesser degree. At the front of the mouth are the incisors. These are usually sharp, flattened teeth, for clipping off food, and they're useful regardless of whether you're a herbivore or a carnivore. Behind these are the canines, large sharp teeth for tearing into flesh.
You might think that ungulates wouldn't have canines. Rodents don't, after all, and indeed, there are some ungulates that also lack them. But, in fact, most do. Take a look at the moose skull above. In the lower jaw, there appear to be four incisors on each side. But there can't be, because placental mammals never have more than three incisors in each side of each jaw. The fourth one is actually a canine tooth, shaped just like the incisors, because that's what's useful to a herbivore.
There are other exceptions, though. Horses, for instance, have fairly pathetic canines that, nonetheless, do look like canines. Going entirely the opposite way are animals such as musk deer. Male musk deer have enormous sabre-like canines in the upper jaw that, relative to the animal's size, would do a Smilodon proud. That those of females are much smaller reminds us that teeth aren't just for feeding - you can fight with them, too.
Behind the canines, ungulates have a broad gap in the mouth, where there are no teeth. This is called the "diastema", and it allows the animal to hold food in place with its cheeks and lips before chewing it, giving them more time to grind it up, rather than gulping it down. Behind that are the premolars and molars, which can be quite hard to tell apart in many herbivores, because they're all used for the same purpose.
It's these teeth that are the real distinguishing feature of herbivores, and, together with the presence of a large diastema, they're a good indication that a skull belongs to an animal that eats plants. The main problem with eating tough plant matter is that it tends to wear down the teeth, and that, for the same reason, it's difficult to grind up. To deal with the first problem, the teeth of grazing animals are often unusually tall, extending a long way beyond the gum. These are called "high crowned" teeth, or "hypsodont" in the technical jargon. They're that way not just because grass is especially tough (although it is), but because it's hard not to pick up bits of soil and grit while chomping on it, so tooth wear is a particular problem for such animals.
An even more common feature in the cheek teeth of herbivores is the presence of sharp parallel ridges to grind up the food. The teeth of other mammals have an extremely hard outer surface of enamel, with a more bone-like material called dentine on the inside. In many herbivores, the outline of the tooth has multiple narrow folds in it, so that the enamel cuts deep within the dentine, forming extra-hard plates inside the tooth. When the ungulate is born, the enamel also forms a cap over the top of the tooth, as it does in other mammals. However, this is thin, and quickly worn away.
The end result is that the enamel outer surface now sticks up as a sharp ridge around the outline of the tooth. Inside the ridge, there is just exposed dentine. Although there's really just one ridge around that dentine, the multiple folds in the outline of the tooth mean that you have the appearance of multiple ridges joined together at their outer edge. So, you get several parallel cutting surfaces for the price of one.
Even herbivores that don't need high-crowned teeth, for example because they browse on leaves rather than eating grass, tend to have this pattern. The exact details vary between different groups of mammalian herbivore, because there's more than one way to fold up the outline of the tooth to achieve the desired result. Cloven-hooved animals, for example, tend to have curving crescent shapes, while horses and rhinos have something shaped more like the Greek letter π. Elephants, and to a lesser extent, rodents, go even further, having elongated teeth that can fit in a huge number of narrow linear ridges.
Considering the number of adaptations that ungulates have evolved to deal with plants, it's interesting to note that one group of them gave up on a vegetarian diet altogether. They were most closely related to modern hippos, and, like them, lived in the water. As they evolved, they became more and more adapted to a watery lifestyle, eventually leaving the land altogether. They did away with their feet, developing flippers instead. But, even before that, they also switched to a wholly carnivorous lifestyle, developing teeth that looked nothing like those of their fellow ungulates (although, perhaps coincidentally, they do have multiple chambers in their stomachs).
We don't call these animals ungulates any more, even though they belong to the same group as the cloven-hooved animals. Instead, we call them whales, porpoises, and dolphins.
[Pictures by "Vassil" and "Mattes" from Wikimedia Commons. Cladogram adapted from Nishihara et. al. 2006]