Shakespearean sonnets, consists of 14 lines, written in iambic pentameter. Shakespear wrote all most all of his 155 sonnets in iambic pentameter.
The rhyme scheme in a Shakespearean sonnet is a-b-a-b, c-d-c-d, e-f-e-f, g-g; the last two lines are a rhyming couplet.
It consist of three quadrants(pair of couplets,4 lines) they follow abab cdcd efef, it reflects upon the conflict Shakespeare is facing at the given time of writing. In sonnet 55, he is taking about preserving the memory of his lover and protecting him from oblivion, in sonnet 30 he talks about mournful recollections of his deceased friends that are ignited by the lover’s absence.
In the ending couplet (gg) he does a turn around and changes his entire mood. Sonnet 55 he proclaims his lovers memory shall for ever endure in his verse. In sonnet 30 he reveils that when hee thinks of his friend(lover) all his sorrows go away.
Bot sonnet 55 and 30 fall into the sonnets dedicated to the fair youth who is often described as his homosexual lover.
The Italian sonnets or Petrachan sonnets included two parts. First, the octave (two quatrains first 8 lines ), which describe a problem, followed by a sestet (following 6 lines), which gives the resolution to it. Typically, the ninth line creates a change or flip which signals the move from proposition to resolution. Even in sonnets that don't strictly follow the problem/resolution structure, the ninth line still often marks a "turn" by signaling a change in the tone, mood, or stance of the poem.
In the sonnets the a-b-b-a, a-b-b-a pattern became the standard for Italian sonnets. For the sestet there were two different possibilities, c-d-e-c-d-e and c-d-c-c-d-c. In time, other variants on this rhyming scheme were introduced such as c-d-c-d-c-d which is used in GM Hopkins Gods Grandeur, and c-d-c-d-e-e in John Donnes holy sonnet 14 Batter my heart….. .