What is the difference between alliteration and repetition?

Alliteration and repetition are similar literary devices in that they are both used to create rhythm or emphasize an idea. However, they should not be confused.

Alliteration involves the repetition of the same sound at the beginning of a series of words, like in “grass grows greener.”

Repetition involves repeating the same word in different parts of a sentence or paragraph (e.g., “As of some one gently rapping, rapping at my chamber door”).