The white wire is wrapped with black tape to identify it as hot. The black wire connects the fan to the speed controller. The red wire connects the light to the dimmer.
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 wall outlets are wired in a row using the terminal screws to pass voltage from one receptacle to the next. In this diagram, multiple receptacles are connected together using the device, instead of a pigtail splice as shown in the next diagram. Using this method, any break or malfunction at one outlet will likely cause all outlets that follow to fail as well.
This diagram shows two switches in the same box with two separate 120 volt sources. Three-wire cable is supplying the source for both switches with the black and red wires going to the bottom switch terminals. The black wire from each light is connected to the top terminal of their respective switch. The white and ground wires are spliced to run to each light fixture.