okay, first pick your site: it needs to be 10x10 or smaller. Then, channel out the area that the bridge is going to cover. Continue to channel as deep as you want/dare. You'll probably need access shafts, but can wall these off later. Fill the bottom of your pit as you choose: spikes are the easiest: build the trap component menacing spike at a valid workshop (glass furnace, forge, or carpenter's shop: metal from the forge is deadliest), and when you have some b-T-S to build upright spears/spikes on the bottom of your pit. 10 spears/spikes per tile is deadliest, but especially for coverage on a big bridge, you can go with as few as one. If you want to be assured of kills, attack the spike patches to a single lever (b-T-l to create a lever, new job > link to Spears/spikes from the lever to attach): you can pull this lever on repeat to perforate any goblin that happens to survive the fall. Not necessary, especially if the fall is long (10+z) and the pit inescapable.
The bridge itself is constructed by b-g. Use umkh to resize it to cover the whole top of the pit and make sure it is listed as "retracts" (s when placing, but it's the default state). It takes architecture and one other labor (probably masonry if you use stone) to construct. Attach it to a lever, preferably one in a high traffic area of your fort for quick response time: again, b-T-l to make a lever, then a new task from the lever to link it to the bridge. Creating a lever takes 1 mechanism (from a mechanic's workshop) while linking to an object takes 2, so to get a proper retracting bridge you need 3 mechanisms.
That's the basic setup to create a drop-'em-to-their-deaths trap. you can get more diabolical, like having magma at the bottom, or very clever about the placement, but ultimately what you need to do is channel out the pit, fill the bottom with something deadly if you don't trust the fall to do the job (and I don't: a 13z pit scheme regularly left survivors for me until I installed spikes), and build and connect the bridge. anything else is gravy.