Contrary to popular belief, no English law explicitly prohibited women from acting on the public stage in Shakespeare's time. The barrier was custom and social convention—powerful, unwritten rules that deemed public performance by women immodest, disreputable, and socially unacceptable.
Female roles—Juliet, Lady Macbeth, Cleopatra, Rosalind—were played by adolescent boys and young men whose voices hadn't deepened and whose physiques could plausibly suggest femininity. These "boy actors" were apprentices in adult companies, trained in voice, movement, and rhetoric. Their performances were so central to the theater's operation that playwrights wrote with their capabilities in mind—hence the frequent cross-dressing plots (Viola in Twelfth Night, Rosalind in As You Like It) that turned the convention into dramatic resource.
The ban applied specifically to commercial public theaters (the Globe, the Rose, the Swan). Women did perform in:
The convention shattered after the 1660 Restoration. Charles II, influenced by French theater during exile, granted patents to the King's Company and Duke's Company that explicitly permitted—even encouraged—female performers. Margaret Hughes (often cited as the first professional English actress, in Othello, 1660) and Nell Gwyn became stars, ushering in a new era.
Shakespeare never wrote for actresses—but he wrote for the boy actors who became the first generation of female-role specialists, crafting some of theater's most complex women within the constraints of his time.