This diagram illustrates a switch and receptacle in the same outlet box located in the middle of the circuit. This wiring allows the electricity to continue from the receptacle, on to any other outlets in the circuit and it provides a switch to control a light fixture or other load, such as another receptacle or a fan.
This is the updated wiring for this arrangement, with a 2-wire cable added between the fan/light and switches. The white wire is no longer used for hot and the source neutral is run through to the switch box to satisfy the 2011 NEC requirement of a neutral wire in all switch boxes. All other wiring is the same as above.
This diagram illustrates the wiring for a circuit with gfci receptacles followed by a light and switch. By connecting the switch to the load terminals on the gfci, the light is protected against ground faults as well.
In this diagram, a light switch and receptacle are wired in the same box. Both devices are spliced to the same hot source and the neutral to the neutral on the receptacle, and through to the light fixture located in a separate box.