Building code

A building code is a set of rules set to govern a a building's design, construction, testing, inspections, and maintenance to protect public health, safety and welfare. Building codes are adopted and enforced by the government, who may inspect buildings to make sure they follow the rules.
A building code may provide rules for many different things and is influenced by materials manufacturers, firefighters, and building officials. The building may need to follow rules about providing parking or affecting traffic. There will be rules about making the building safe during disasters, such as fires, earthquakes, and tornadoes.
The rules used on a specific building may be very different depending on where the building is and what it is used for. For example, a house will have extra rules about making sure people can live there, while a hotel will have extra rules about fire exits. Many public buildings have a "maximum occupancy" for some rooms, which is how many people may be allowed into that room at once.
Building codes can also be accompanied by zoning ordinances that dictate style, building use, etc.
Earthquakes.
Any building code has either some minimum requirements for seismic loads ("prescriptive code") or some seismic performance rules ("performance-based code").
Seismic design is based on procedures meant to protect structures that may experience earthquake impact. However, a design which blindly follows seismic code rules does not guarantee safety against collapse or serious damage.