Damage in earthquakes depends on the strength of the ground shaking and the ability of a structure to accommodate this shaking. Building codes define the guidelines for how strong structures need to be to perform well in earthquakes and continue to evolve as engineers and scientists better understand earthquakes and how structures respond to ground shaking.