When comedians write jokes, they use the time-tested structure of a setup followed by a punchline. This construction is exhibited in the simplest jokes, such as when Henny Youngman said, "Take my wife...please." People laugh because of the element of surprise when the premise of the set-up takes an unexpected turn or twist in the punchline. Comedians string together groups of jokes on one theme, such as airlines, dating or restaurants, to create longer comedy routines.
An additional element that may be added to the setup and punchline joke structure is the topper. A topper is one or more additional punchlines that take the joke to a new level, making the audience laugh longer and louder than at the first punchline. A topper might build upon the premise of the joke or take another unexpected twist in a new direction.
A useful tool for writing jokes is the Rule of Three. This is a joke in three parts: the first item acts as a setup, the second item reinforces a pattern and the third item breaks the pattern with a twist. For example, someone might ask a bald person, "Can I get you anything? Coffee? Doughnut? Toupee?" The Rule of Three is also used in many classic joke structures, such as, "A minister, a priest and a rabbi walk into a bar." This form also makes the joke easier to remember.