Previous attempts to determine palaeoenvironmental preferences in dinosaurs have generally been qualitative assessments based upon data from restricted geographical areas. Here, we use a global database of Cretaceous herbivorous dinosaurs to identify significant associations between clades and broad palaeoenvironmental categories ('terrestrial', 'coastal', 'marine'). Nodosaurid ankylosaurs and hadrosaurids show significant positive associations with marine sediments, while marginocephalians (Ceratopsia, Pachycephalosauria), saurischians (herbivorous theropods, Sauropoda) and ankylosaurid ankylosaurs are significantly positively associated with terrestrial sediments. These results provide quantitative support for the hypothesis that some clades (Nodosauridae, Hadrosauridae) were more abundant in coastal and/or fluvial environments, while others (e.g. Marginocephalia, Ankylosauridae) preferentially inhabited more distal environments.