Hamlet (c. 1599–1601), on the other hand, chooses a tragic model closer to that of Titus Andronicus and Kyd’s The Spanish Tragedy. In form, Hamlet is a revenge tragedy. It features characteristics found in Titus as well: a protagonist charged with the responsibility of avenging a heinous crime against the protagonist’s family, a cunning antagonist, the appearance of the ghost of the murdered person, the feigning of madness to throw off the villain’s suspicions, the play within the play as a means of testing the villain, and still more. Source: https://www.britannica.com/biography/William-Shakespeare/Julius-Caesar#ref232327