Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 11:45 PM
John Bokma
Guest
 
Posts: n/a
Default How to mark up poetry?

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/
  #2  
Old July 20th, 2005, 11:46 PM
Garmt de Vries
Guest
 
Posts: n/a
Default Re: How to mark up poetry?

John Bokma <postmaster@castleamber.com> wrote in message news:<40b4ce15$0$197$58c7af7e@news.kabelfoon.nl>.. .[color=blue]
> 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.[/color]

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.
[color=blue]
> 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.[/color]

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

Best regards,
Garmt.
  #3  
Old July 20th, 2005, 11:52 PM
Deirdre Saoirse Moen
Guest
 
Posts: n/a
Default Re: How to mark up poetry?

John Bokma <postmaster@castleamber.com> wrote:[color=blue]
> using <pre class="poem"></pre>?[/color]

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!"
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles