You can easily attach a lamp to a dimmer device. Lamp-base dimmers screw directly into a lamp’s socket. Plug-in table or floor lamp dimmers allow you to simply plug your lamp into the device and then plug the device into the wall. In-line lamp cord dimmers, which can be attached to a lamp cord, are also available. Here are directions for wiring such a device:
1) After making sure your lamp is unplugged, use a utility knife to separate the two wires in your lamp’s cord.
2) Look at the wires to determine which one is neutral and which one is hot—the hot wire has smooth insulation, and the neutral wire will be ribbed. Slice through the hot wire where you wish to install the dimmer.
3) Use wire strippers to strip about 1 inch of insulation from both ends of the cut hot wire.
4) Unscrew and remove the cover of the dimmer switch. Place the neutral wire along the inside of the switch box, as specified by the manufacturer. Put the cut ends of the hot wire under the two terminal clamps, and fasten them in place by turning the screws.
5) Screw the dimmer switch’s cover back into place. Plug the lamp in, and check to make sure the new switch works.