The kings and queens in these plays number 27, and a recurrent theme is legitimacy. A third of all the Shakespeare plays were first performed for a royal occasion. These include The Winter's Tale, Cymbeline, The Tempest, Macbeth, Measure for Measure, Merry Wives of Windsor, Twelfth Night, Henry VIII, King Lear, Love's Labour's Lost, and Othello. There is no record of William Shakespeare being presented either to Queen Elizabeth or to King James. If you ask people to say which, in their opinion, is Shakespeare's greatest play, the majority will say Hamlet.
Great fiction is always autobiographical.
Every great novelist and playwright writes about his own life. There is always a close connection between the written works of a great author and his own life. Dickens, Wilde, Byron, Chekov, Tolstoy, Jane Austen, all show this very clearly. One of Jane Austen's friends, Mrs. Barrett, said that Anne Elliott , the heroine of Persuasion , was Jane herself. William Underhill's stepbrother was William Hatton, whose widow, Elizabeth, in 1597 was courted by Bacon.