If your table or floor lamp doesn't have a switch, you have to control it with the wall plug. If the plug is near the floor, it can involve bending over and reaching around furniture. An inline switch is much more convenient and it is very simple to install. Size the switch so it fits around the wire and you can complete the job in five minutes or less. It's an operation that doesn't require any advanced wiring techniques.
Unplug the lamp.
Identify the hot wire on the lamp cord. It is the one leading from the narrow prong on the plug if the plug has two different size prongs. If the prongs are the same size, examine the casing around the wires. The casing around the neutral wire is textured or identified with a mark. The casing around the hot wire is plain.
Cut through the casing between the wires at the switch location and pull them apart so that there is a loop about 2 inches long. Cut through the hot wire in the middle of the loop with a pair of wire snippers, but leave the neutral wire intact.
Unscrew the screw in the middle of an inline switch with a No. 1 Phillips screwdriver. Separate the halves. Be sure to catch the nut on the opposite side of the switch if it falls off.
Lay the wires in the bottom half of the switch, which is the half without the metal spikes. Lay the neutral wire in the continuous moulded area on one side of the central hub and the ends of the hot wires in the separated moulded areas on the other side. The moulding design will help you to place the wires correctly.
Fit the top half of the switch on the bottom half and squeeze the two halves together to force the metal spikes in the top half through the sheathing of the hot wire. Hold the switch firmly while you replace the screw and nut and tighten the halves back together.
Plug in the light and test the switch.
Check the wattage of the light bulb in the lamp and make sure that the switch is rated for that wattage or is higher.