What is generally accepted as the first building code was in the Code of Hammurabi which specified:
1.If a builder builds a house for someone, and does not construct it properly, and the house which he built falls in and kills its owner, then that builder shall be put to death.
2. If it kills the son of the owner, the son of that builder shall be put to death.
3. If it kills a slave of the owner, then he shall pay, slave for slave, to the owner of the house.
4. If it ruins goods, he shall make compensation for all that has been ruined, and inasmuch as he did not construct properly this house which he built and it fell, he shall re-erect the house from his own means.
5. If a builder builds a house for someone, even though he has not yet completed it; if then the walls seem toppling, the builder must make the walls solid from his own means