What is dramatic irony?

A. the series of events that occur in a literary work.
B. a contrast between a character's expectations and the audience's or reader's knowledge.
C. a speech in which a character in a play expresses their inner thoughts.
D. when a person says something but intends it to mean the opposite.

B. a contrast between a character's expectations and the audience's or reader's knowledge.