Answer:
Words in the poem, such as tapping and rapping, imitate the sound of knocking on a door. Because these words imitate the sound they describe, they are onomatopoeic:
While I nodded, nearly napping, suddenly there came a tapping,
As of someone gently rapping, rapping at my chamber door
Explanation: