The Tempest contains many moments of dramatic irony. For instance, many characters believe that others died in the storm, but the audience knows otherwise. Ferdinand and Alonso each believe the other has died in the tempest, and Alonso even threatens to drown himself in his grief. But the audience remains aware that everyone is alive and well despite dark thoughts and attempted murder plots, which deepen the drama without changing the fact that the play is, essentially, a comedy. This foreshadows the play's peaceful resolution; the audience gets the sense that conflicts will be resolved as they arise.
Another example of dramatic irony is the fact that Prospero rules the island. He seeks revenge on the royals who dethroned them. They, however, have no idea that Prospero caused the storm or is the island's ruler. This is dramatically ironic because the audience knows something that the characters do not. In Act 1, Scene 2, Prospero celebrates the fact that he will be able to enact his revenge:
By accident most strange, bountiful Fortune,
Now my dear lady, hath mine enemies
Brought to this shore; and by my prescience
I find my zenith doth depend upon
A most auspicious star, whose influence
If now I court not but omit, my fortunes
Will ever after droop.
Prospero has full knowledge of his enemies' presence, but they remain ignorant of him until later in the play. Here, dramatic irony serves to show Prospero's power; he is often portrayed as a playwright figure who controls the actions of the other characters and has more knowledge than anyone else.