A folding coffee table is a great way to have table space when you need it while retaining the option of extra floor space by folding it away. A simple wooden coffee table is easy to construct and folding legs can allow you to stash it away--perhaps behind the couch--when you don't need it. Start with good quality wood and hardware for the sturdiest table possible.
Cut the 2 by 2-inch lumber into two 5-foot-8-inch pieces, two 17-inch pieces and four 16-inch pieces with a hand or power saw. The 16-inch pieces will be the legs, so if you want a taller or shorter table, adjust their length.
Form a rectangle with the 5-foot-8-inch lengths for the top and bottom and the 17-inch pieces for the sides, with total outside dimensions of 5-foot-8 by 20 inches (2 by 2 lumber is actually 1 1/2 by 1 1/2).
Screw this rectangle together by drilling a 1/8-inch hole for each screw to avoid splitting the wood, then driving screws in with a Phillips head bit on your drill or power driver.
Lay a 2 by 6-foot piece of plywood over the top of your rectangle so there is 2 inches of overhang on each side. Screw the plywood onto the frame securely, then flip the tabletop over so your frame pieces face up.
Place one leg in each corner, inside the frame, leaving about 1/2 inch of space between the leg and the short end of the frame to allow it to swing closed easily. Using 1/2-inch wood screws, attach a hinge on the side of each leg that faces toward the centre of the table's long side. All four legs should be able to fold inward without overlapping.
Fold the legs out into their open positions and align a sliding bolt lock (the metal locks often used on bathroom stall doors) along the long side of the frame so the bolt will slide into the leg when it is locked. Mark where the bolt will hit the leg, then remove the lock and drill a hole for it. Discard the loop the bolt would slide into if you were locking two surfaces on the same plane. Attach the lock to the wood using the screws that came with it. When you want to use the table, unfold the legs and slide the bolts into place to keep the legs open.
Sand any rough edges and paint the table as desired.