A group of castaways washes ashore in a faraway land, storm-seperated twins are reunited after hardship, illusion and love unsettle notions of reality -- these are the materials of romance, a genre that was compatible with the lightness of comedy and the darker elements of tragedy. Like the Comedy of Errors, A Midsummer Night's Dream, As You Like It, Pericles, The Tempest, and The Winter's Tale, Twelfth Night is evidence of Shakespeare's continuing interest in romance and its combination with other dramatic genres, especially comedy.

The setting of Twelfth Night is especially important to the play's romantic atmosphere. "Illyria" refers to a place on the east coast of the Adriatic Ocean (between what is now Greece and Albania), but in Shakespeare's time the name may not have suggested a real country. Illyria may have been as fantastical a place as Camelot.