What are the safety requirements for decks?

Decks higher than 30 inches that are not encompassed by the exterior walls of the main building structure require guardrails at least 42 inches in height at the edges. Guardrails must withstand a 20-pound per foot load applied at the top of the rail.  Intermediate members in open-type railing cannot be spaced more than 6 inches apart.