Twelfth Night; or What You Will was composed by William Shakespeare in either 1600 or 1601 as the last of his three "mature comedies" (the other two being Much Ado About Nothing and As You Like It). Like his early comedies, The Comedy of Errors or The Taming of the Shrew for instance, Twelfth Night is essentially a celebration of romantic love and can be viewed as a traditional romantic comedy. The play has many of the elements common to Elizabethan romantic comedy, including the devices of mistaken identity, separated twins, and gender-crossing disguise, and its plot revolves around overcoming obstacles to "true" love. And, like other representatives of the genre, Twelfth Night also features a subplot in which a self-inflated "sour" or "blocking" character, the steward Malvolio, is brought to his knees through a trick orchestrated by a ribald if also self-inflated character in the person of Sir Toby Belch.
But unlike his early comedies, Shakespeare also strikes some discordant notes in Twelfth Night, including a conception of love and other themes that are not part of the conventional romantic comedy formula. Thus, for example, the subject of insanity surfaces as a salient theme and as a force within the plot. Indeed, while Twelfth Night concludes with tandem weddings, Shakespeare also speaks about the madness of love.
Did this raise a question for you?