Whitman’s extolling the shores to exult is an example of personification, in which nonhuman things are given human-like characteristics or qualities. Personifying the shores is possibly a form of metonymy, a device in which something is referred to not by its name but by something closely associated with it. Therefore, the shores represent the masses of people welcoming the ship as it enters the harbor.
Whitman juxtaposes the commemoration of a victory with the death of the ship’s captain throughout the poem. Juxtaposition is a literary device in which two things are placed alongside each other in order to highlight their differences. By presenting images of celebration alongside images of the dead captain, Whitman reveals the tragic irony of a leader’s not being able to join in celebrating victory.
"for you the flag is flung..."See in text(Text of the Poem)
This line contains alliteration, or the repetition of consonant sounds, in the words “flag” and “flung.” In this case, alliteration both enhances the images of celebration—which Whitman contrasts with images of the captain who has “fallen cold and dead”—and reinforces the poem’s steady rhythm.
"Fallen cold and dead...."See in text(Text of the Poem)
Each stanza of the poem ends with the refrain “fallen cold and dead.” A refrain is a line or group of lines that repeat throughout a text, usually at the end of a stanza. By concluding each stanza with a reminder that the captain has died, Whitman creates a vivid contrast between the celebration and the captain lying dead on the ship’s deck.
"heart! heart! heart!..."See in text(Text of the Poem)
The repetition of the word “heart” is an example of epizeuxis, a literary device in which words are repeated without intervening words between them. In this context, epizeuxis underscores the distress of the speaker, who mourns the death of his captain.
"The ship has weather'd every rack..."See in text(Text of the Poem)
The ship is a symbol for the United States, which had just emerged from the Civil War (1861–1865) at the time Whitman was writing. The victorious return of the ship without its captain is an extended metaphor, which unfolds throughout an entire text, for President Lincoln’s leading the Union to victory over the Confederacy and his assassination.
"O captain! my Captain!..."See in text(Text of the Poem)
The exclamation points that break up the first line of the poem are an example of caesurae, which are breaks or pauses created by punctuation marks in the middle of a line of verse. Together with diacope, caesurae establish rhythm while calling the reader’s attention to the subject of the poem—the fallen captain.
"O captain! my Captain!..."See in text(Text of the Poem)
Whitman’s speaker is addressing his captain, which is an example of apostrophe, or a device in which a narrator speaks to someone or something that cannot respond. In his exclamation of “O Captain! my Captain!” the speaker expresses a strong emotion that quickly shifts from triumphant to despairing.
"O captain! my Captain!..."See in text(Text of the Poem)
The first line of the poem is an example of diacope, or the repetition of a word with intervening words in between. By forcefully repeating the word “Captain,” Whitman immediately emphasizes the subject of the poem while also establishing rhythm.