This post will show you how to format a poem in WordPress and eliminate the extra vertical spaces that are automatically inserted between paragraphs in WordPress.
See the comments below for other ways to format your poem.
HTML stands for Hypertext Markup Language. It is code that tells your browser how to format the text and media in a web page.
Step 1: Insert Line Breaks
In your favorite text editor (not WordPress), add <br> to the end of each line in your poem. Also add <br> to the end of the title and in each blank line. This code will tell WordPress where you want a line break.
If you are using Microsoft Word, you can use the find and replace function to speed up this process. The two characters ^p represent the (usually invisible) paragraph return character in Word. In the find box type ^p and in the replace with box type <br>^p and then replace all. If your lines end with line breaks and not paragraph returns, then you would need to find ^l (caret and lowercase L) and replace them with <br>^p.
Step 2: Add Bold and Italic Font
If you need to add bold or italic font, perform the following steps.
Type <strong> to the left of and </strong> to the right of each series of bold text.
Type <em> (short for “emphasis”) to the left of and </em> to the right of each series of italic text.
Step 3: Adjust the Vertical Line Spacing
To adjust the vertical space between lines, copy the following text and paste it to the left of the first line in your poem.
<p style=”line-height: 1.5;”>
Make sure the double quotation marks ” are straight and not curly, or the code will not be read. You might have to retype them after you copy your poem into WordPress.
Then paste </p> to the right of the final line in your poem. It should come after the final <br>.
You can increase or decrease the number 1.5 to increase or decrease the space between each line of your poem.
Your poem and code should look something like this:
Step 4: Add an HTML Block
To add an HTML block to your post or page, type /html in a new block and click the Custom HTML button.
Then copy your poem and code and paste it into the HTML text box on your post or page. Make sure the double quotation marks are straight and not curly. You will have to retype them if they are curly like this “.
You can click the Preview button above the HTML block to preview the text, but to see how it will actually look with your theme, save the post or page as a draft and then click View, Preview in new tab. (These options are near the Publish button.) You can then go back to the HTML block and edit it if you need to make any changes.
The code shown above outputs a poem with the following appearance. The font will look different, depending on which font you use in your theme.
Let me not to the marriage of true minds
Admit impediments. Love is not love
Which alters when it alteration finds,
Or bends with the remover to remove:
O, no! it is an ever-fixed mark,
That looks on tempests and is never shaken;
It is the star to every wandering bark,
Whose worth’s unknown, although his height be taken.
Love’s not Time’s fool, though rosy lips and cheeks
Within his bending sickle’s compass come;
Love alters not with his brief hours and weeks,
But bears it out even to the edge of doom.
If this be error and upon me proved,
I never writ, nor no man ever loved.