A set of rules governing safe wiring methods. Local codes which are backed by law may differ from the NEC in some ways.