levity

Definition

Humor or frivolity, especially when inappropriate in a serious situation.

Example

"His levity during the funeral made some guests uncomfortable."