I do a lot of writing about prose, but many writers who write it have also tried their hand at poetry at some point -- including me. So if you've ever scribbled a sonnet, composed an ode or created a song (or wanted to), this post's for you.
Anyone who's ever read Lewis Carroll may think that poetry is a genre that knows no rules, but this isn't actually the case. Depending on the type of poem you're writing, there are specific and distinct rules you're required to follow.
For example, a sonnet almost always has 14 lines of text and a very specific rhyming pattern. If you're writing a traditional English sonnet, Shakespearean fashion, it must have 14 lines and it must be written in iambic pentameter. In the iambic pentameter style of poetry, an unstressed syllable is followed by a stressed syllable; the pattern is repeated five times. If it sounds complicated, that's because it is. Sonnets are celebrated because they're terribly difficult to write; if they come out sounding great, it's truly an artistic masterpiece. In a traditional English sonnet, the rhyming pattern is: a-b-a-b, c-d-c-d, e-f-e-f, g-g.
If you're determined to follow rules in poetry, try something a little simpler -- maybe a haiku, a form of short Japanese poetry. Or is it simpler? In traditional haiku writing, two separate ideas are juxtaposed with a cutting word between them to show the line of separation. There are three lines of text in a haiku: 5, 7, 5. It's a common misconception that a haiku contains 17 syllables. This is not true. A haiku contains 17 on, which is a word sound. For example, there are three syllables in the word Tokyo, but there are four on (to-o-kyo-o). In modern haiku poetry, it's not necessary to follow the 17 on rule -- but the juxtaposition of ideas remains a very basic mainstay of this particular type of poetry.
In ballad poetry, the words are usually used to tell a story and often these types of poems contain a repeated refrain. Songwriting is a form of ballad poetry. There are literally dozens of different kinds of poetry, some that are built around certain themes, some around certain rhyming patterns, some that have both. But if you want to chuck all the rules and go your own way, you absolutely can.
One of the great things about poetry is that it doesn't have to follow any rules to be great -- just ask Emily Dickinson (clearly, that's just an expression). Weird punctuation, unpatterned rhymes, no rhymes at all; poets are free to do whatever they want if that's what they desire. But if you want to write a specific type of poem, make sure you do your research and follow all of the rules.