By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,785 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,785 IT Pros & Developers. It's quick & easy.

How to mark up poetry?

P: n/a
using <pre class="poem"></pre>?

or a <div class="poem"></div> in combination with <br> Which I use now,
and think its ugly, I prefer the pre I think but I ask first :-D.

I read somewhere, sometime ago, about using a div for each line (each
verse [1]), hold lines together (stanza [1]) with another div, and
another div to contain all.

Any suggestions / pointers are welcome.

[1] I hope I use these terms correctly.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced Perl programmer available: http://castleamber.com/
Jul 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
John Bokma <po********@castleamber.com> wrote in message news:<40*********************@news.kabelfoon.nl>.. .
using <pre class="poem"></pre>?

or a <div class="poem"></div> in combination with <br> Which I use now,
and think its ugly, I prefer the pre I think but I ask first :-D.
I think a <div> is more logical. It's one lump of text belonging
together, so why not put it in a div? If you use <pre>, most browsers
will, by default, render this in a monospace font, which may not be
what you want. You could style the pre according to your wishes, of
course.

More importantly, inside the <div> you can add still more structure at
the markup level, allowing you to style, for example, the first letter
of each stanza.

If you have complicated indentation that is relevant for the poem,
<pre> may be easier. You can add <span>s and give them the appropriate
margins, but a <pre> is more robust if a user doesn't follow your CSS
suggestions.

Have a look at http://www.phys.uu.nl/~gdevries/test/poem.html: I wrote
the same poem twice, once in a <div> and once in a <pre>. Try viewing
the page without the styling (easily done in Opera), and you'll see
the differences.
I read somewhere, sometime ago, about using a div for each line (each
verse), hold lines together (stanza) with another div, and
another div to contain all.


Why make it so complicated? Using <p> for a stanza, and <br /> for a
line break seems more natural.

Best regards,
Garmt.
Jul 20 '05 #2

P: n/a
John Bokma <po********@castleamber.com> wrote:
using <pre class="poem"></pre>?


I wouldn't do it this way because not all poems are formatted and some
have typographical quirks that this wouldn't show.

--
_Deirdre http://deirdre.net
"Memes are a hoax! Pass it on!"
Jul 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.