Foreshadowing and dramatic irony both create anticipation; dramatic irony occurs when the audience knows more than the characters, enhancing the impact of foreshadowed events.