A play within a play is a dramatic plot device or extended metaphor where characters narrate one story while still part of another. Playwrights use such juxtaposition of nested plays to give a performance of self-reflection and to reiterate the play's main themes. The French term is "Mise en abyme."
William Shakespeare cleverly deployed the play within a play device in many works such as the play "Murder of Gonzago" within the play "Hamlet." However, it was Thomas Kyd's revenge drama "The Spanish Tragedy," written between 1587 and 1590, that first used this element and set new standards for plot construction.