Non-bird dinosaurs lived between about 245 and 66 million years ago, in a time known as the Mesozoic Era. This was many millions of years before the first modern humans, Homo sapiens, appeared.
Scientists divide the Mesozoic Era into three periods: the Triassic, Jurassic and Cretaceous. During this era, the land gradually split from one huge continent into smaller ones. The associated changes in the climate and vegetation affected how dinosaurs evolved.