Shakespeare married Anne Hathaway in November 1582 at age 18. The legal marriage age in England was 21, so they likely obtained a special dispensation (a marriage license from the Bishop of Worcester) to marry.
Anne was 26 and pregnant—practical urgency likely motivated the dispensation. The marriage was valid, producing three children: Susanna (1583), and twins Hamnet and Judith (1585).