gallows humor


noun

humor that treats serious, frightening, or painful subject matter in a light or satirical way.

Origin of gallows humor

First recorded in 1900–05