What comic elements does the play Hamlet contain? What scenes, what characters what exchanges of dialogue?
Polonius is a constant source of humor throughout the play with his pomposity, long-windedness and penchant for dispensing platitudinous, unwanted advice. He's also something of a figure of fun to Hamlet, the object of his warped sense of humor:
Excellent well. You are a fishmonger. (act 2, scene 2)
In Hamlet's day, the social status of a fishmonger was lowly, to say the least. It was also a slang expression for a pimp, so Hamlet's use of the word is doubly insulting to the noble Polonius. Later on in the play, Hamlet provides us with more humor at Polonius's expense by getting him to play along with his feigned madness. Hamlet draws Polonius's attention to a cloud:
HAMLET: Do you see yonder cloud that’s almost in shape of a camel?
POLONIUS: By th' mass, and ’tis like a camel indeed.
HAMLET: Methinks it is like a weasel.POLONIUS: It is backed like a weasel.
HAMLET: Or like a whale.
POLONIUS: Very like a whale. (act 3, scene 2)
GRAVEDIGGER: What is he that builds stronger than either the mason, the shipwright, or the carpenter?OTHER: The gallows-maker, for that frame outlives a thousand tenants.GRAVEDIGGER: I like thy wit well, in good faith. The gallows does well, but how does it well? It does well to those that do ill. (act 5, scene 1)
There’s another. Why may not that be the skull of a lawyer? Where be his quiddities now, his quillities, his cases, his tenures, and his tricks?
Shakespeare's Tragedy of Hamlet, Prince of Denmark is a play that contains quite a few comic elements, and most of them involve the title character himself. Hamlet's ironic wit and his tendency to speak satirically appear in many scenes throughout the play.
In Act I, scene I, Hamlet speaks with Horatio ironically about his mother's wedding and his father's funeral, mocking the speed at which his mother re-married with comments about the food from the funeral that had barely cooled before it was offered a second time to wedding guests. Hamlet says, "Thrift, thrift!" which also suggests that his mother, in cold-hearted pragmatism, was saving money by re-using the food.
Later in the play, in Act II, scene 2, when Polonius asks Hamlet about what he is reading, Hamlet states the obvious: "Words, words, words!" Hamlet deliberately evades the question, answering it literally and pretending to misunderstand Polonius's intent.
Hamlet uses this method of intentional misunderstanding to humorous effect in other places as well, like when he engages with Rosencrantz in Act II, scene 2: "There is nothing either good or bad, only thinking that makes it so." Again, Hamlet sounds like he is stating the obvious, but a deeper meaning can be read into his witticism about the nature of truth.
The most obvious comic scene in Hamlet occurs in Act 5, sc. 1 with the gravediggers (often identified as the "clowns"). The exchange between the two men digging Ophelia's grave is very funny. The two exchange riddles and the first gravedigger continues to exchange riddles, as well as word-play, when Hamlet and Horatio come upon them. Then Hamlet asks whose grave it is that the gravedigger is digging. The gravedigger responds that since he's digging the grave, it's his. Hamlet asks is it for a man or a woman, the gravedigger says it's for neither since the one who will lie in it is dead. And on it goes. There is some humor in Act 2, sc. 2 when Hamlet and Polonius exchange words because Hamlet is making fun of Polonius only he doesn't seem to realize it. Also, the exchange between Hamlet and Osric in Act 5, sc. 2, when Osric delivers to Hamlet the challenge to the fencing match from Laertes is humorous because Osric is so fawning and pretentious that Hamlet makes fun of him.