Literary scholars divide texts into groups called "genres" based on their overall forms or structures. When we apply the terms "play", "drama" and "comedy" to Twelfth Night by William Shakespeare , we are assigning it to a generic category. The first major division made among texts is whether they are non-fiction (purporting to describe actual events) or imaginative works. Imaginative works such as Twelfth Night are further subdivided into "fiction" and "drama" (in the context the terms "play" and "drama" are used interchangeably). Fiction is designed to be read, and is a mixture of narration, or description, and dialogue. Plays, or dramas, such as Twelfth Night are meant to be staged, with actors speaking lines of dialogue; there is no narration or description by an external voice of the actors' actions. Plays are further subdivided into comedy (light, humorous, works, often with happy endings, such as Twelfth Night) and tragedy (darker, more sombre works often with unhappy endings).
The ending of Twelfth Night with its witty and happy resolution, and dual marriages is typical of the comic genre:
Pursue him, and entreat him to a peace:—
He hath not told us of the captain yet;
When that is known, and golden time convents,
A solemn combination shall be made
Of our dear souls.—Meantime, sweet sister,
We will not part from hence.—Cesario, come:
For so you shall be while you are a man;
But, when in other habits you are seen,
Orsino's mistress, and his fancy's queen.