Comic irony is a literary technique or rhetorical device in which irony creates a humorous effect. Comic irony comes in many forms, and can derive from ironic statements by characters or narrators in a work of fiction. It can also arise from the situation presented in the work.
Students of rhetoric divide irony into several categories. Any of these categories can play the role of comic irony. Verbal irony, for instance, is a form of irony which arises from the difference between what a speaker says and what he or she means. A classic example of verbal irony used to comic effect occurs in the opening lines of Jane Austen's novel Pride and Prejudice. The novel opens with the remark that "it is a truth universally acknowledged, that a single man in possession of a good fortune, must be in want of a wife." In fact, however, this statement is intended ironically: the female characters in the novel are predominantly concerned with finding single men of good fortune to marry.
Verbal irony arises from a contrast in words; by contrast, dramatic irony arises from the contrast between what the reader or observer knows and what the character knows. A classic example of dramatic irony, used in this case for tragic effect, occurs in Shakespeare's Romeo and Juliet, in which the audience observe characters behaving as if Juliet has died, despite the fact that the audience knows she is alive. Dramatic irony can also be used for comic effect. A similar instance of dramatic irony, used this time for a black comic effect, occurs in Shakespeare's Cymbeline, in which Imogen discovers a headless body which she mistakes for that of her lover, Posthumus. The comic irony arises from the fact that Imogen makes several statements about how she could never mistake Posthumus's body, despite the fact that the audience knows she is actually mistaken.
A third type of irony, situational irony, arises from the events in a work of fiction. In situational irony, the irony develops from the difference between a character's intentions and the outcome of his or her actions. This type of comic irony usually highlights the vanity or ambition of the characters. Situational irony underlies the plot of many television comedies. Classic examples include I Love Lucy or The Simpsons, the plots of which commonly center on the characters concocting elaborate schemes which backfire with humorous effect.