The poetic elements you're describing are:
-
Alliteration: This is the repetition of initial consonant sounds in two or more words in close proximity. For example, "She sells sea shells by the sea shore."
-
Consonance: This refers to the repetition of consonant sounds in close proximity, regardless of where they appear in the words. For example, "The lumpy, bumpy road." In this case, the "m" and "p" sounds are repeated.
Both alliteration and consonance are used to create rhythm, musicality, and emphasis in poetry.