Irony is a literary device where the intended meaning is the opposite of the literal meaning. It can be used to create humor by juxtaposing unexpected elements, such as:
* Situational irony: When something happens that is the opposite of what is expected. For example, a fire station burning down.
* Verbal irony: When someone says something that is the opposite of what they mean. For example, saying "Great weather" on a rainy day.
* Dramatic irony: When the audience knows something that the characters in a story do not. For example, in a horror movie, the audience might know that the killer is lurking behind a door, while the character in the movie does not.
Other related terms include:
* Satire: A type of humor that uses irony, exaggeration, and ridicule to criticize society or individuals.
* Sarcasm: A type of verbal irony that is used to convey contempt or mockery.
* Black humor: A type of humor that deals with dark or taboo subjects.
So, if you're looking for a word to describe humor based on contrast or opposite meanings, irony is a good choice.