To get more practice at using HTML, I chose to put Carl Sandburg’s poem “Nocturne in a Deserted Brickyard” into this language.

I set the entire poem up as a block quote, by using block quote tags before and after the text, inclusive of title and citation. For the title, I decided on a heading level 2, judging that since I set this up as a block quote, there would be at least one higher level of heading on this hypothetical webpage.

Image showing the HTML for a block quote and header level 2.

Figure 1 Showing the HTML for a block quote and header level 2.

The first line of the poem begins with an indent, and so to include this indent, I used the <pre> element to tell the computer that this indent is not for the purposes of keeping my place in the lines of code, but that it is part of the text and belongs in the displayed version. This is shown in step 3 of Figure 2.

Indent of first line using <pre srcset= tag.”>

Figure 2 Indent of first line using <pre> tag.

After entering in each line, I added the break <br> element so that the next line would appear on the next line. Without these line breaks, the lines run together as though they were a prose paragraph and not verse.

Using line break tags to separate lines of poetry.

Figure 3 Using line break tags to separate lines of poetry.

After the final line break, I used the <cite></cite> citation tags to properly attribute this poem to Carl Sandburg. This is shown in step 10 of Figure 4.

The final HTML form of Carl Sandburg's "Nocturne in a Deserted Brickyard," including the citation.

Figure 4 The final HTML form of Carl Sandburg’s “Nocturne in a Deserted Brickyard,” including the citation.

Skip to content