The imagery used in William Wordsworth's "We are Seven," and Shakespeare's Sonnet 12 both deal with age and death.
In Wordsworth's poem, the poet refers often to the images of youth regarding the child:
She was eight years old, she said;
Her hair was thick with many a curl
That clustered round her head.
And there upon the ground I sit,
And sing a song to them....
Together round her grave we played,
My brother John and I.
These stanzas describe the child in appearance or behavior.
Death is also an ever-present theme in this poem.
"Two of us in the church-yard lie,
My sister and my brother...
Two of us in the church-yard lie,
Beneath the church-yard tree."
"Their graves are green, they may be seen,"
The little Maid replied...
[and regarding the little girl's sister:] Till God released her of her pain;
And then she went away.
On the other hand, Sonnet 12's images regarding age deal with the end of one's long life, in appearance and the approach of death due to age.
And sable curls all silver'd o'er with white;
When lofty trees I see barren of leaves...
Borne on the bier with white and bristly beard
Since sweets and beauties do themselves forsake
And die as fast as they see others grow;
And nothing 'gainst Time's scythe can make defence
Save breed, to brave him when he takes thee hence.
The imagery in the second poem points to silver hair, the "bristly beard." The beauty of youth passes quickly as possessors of such things watch others grow, and "Time's scythe" refers to the timeless march of aging that draw each person on the earth closer to death, saved only by what is left behind in one's children ("breed").
Imagery is presented from opposite ends of the aging process—and death, and so the mood for each poem is extremely different. Wordsworth's little girl has seen the passing of two siblings, but in her mind, they are no farther "gone" than siblings who have gone to sea or moved to another town. The speaker is mystified as to her insistence that they are not "gone" at all. While he is perhaps saddened for the little girl, her separation from her siblings is a detail that she dismisses, insisting to the end that they are right there, and she spends time with them, communing in spirit with them at their gravesides while she eats or sews.
However, in Sonnet 12, the mood is decidedly different. Death comes not to the young, but to the old, and there is regret in the passing of youth and beauty. Death is personified as relentless, a shadow ever looking over one's shoulder, and the mood of the poem is much darker.
For two poems dealing with the same topic of death and the age accompanying it, there is a certain irony that the child suffers no regrets or fears of death, even though her siblings have died young, whereas there is dread and seeming regret as time overtakes those who have lived longer, and the aging brings sadness not only because of the impending loss of life, but the "vanity" in losing the bloom of youth on that journey.