A Poem Element for HTML5

Posted by Robert Love on October 8, 2007 in HTML, XHTML

A recent post to the HTML WG list entitled ‘HTML 5′ and some poem markup? has got me all in a huff. It was an innocent request by Dr Olaf Hoffmann which started like this:

What I missed so many years in (X)HTML is some useful markup for poems. The result we can see in the ‘real web life’ - a lot of meaningless tag soup around, disoriented authors lost between silence and semantically meaningless markup… Obviously poem markup is still not available in ‘HTML 5′. Why not? Can this be added to the ‘HTML 5′ draft?

Dr Hoffmann then goes on to plead his case and suggest such semantic elements as <poem>, <stanza>, and <line>.

There were some interesting responses:

  • There’s <p> for each stanza and <br> for separating lines.
  • Are there use case where software that consumes markup would benefit from poem-specific semantics?
  • How would they [search engines] be helped by poem-specific semantics?
  • Do I understand you correctly that you want to include markup for a specific domain (poetry) in HTML5?
  • A markup language should probably include as little as possible from specific domains and focus on the general things instead. Domain specifics should be handled via an extension mechanism that allows for unambiguous interpretation of the expressed information
  • HTML5 actually defines how to mark up poems in HTML (the word "poem" is in the spec half a dozen times, in fact!). Specifically: the stanzas of poems written in the classical form are given by <p> elements, with line breaks indicated by <br> elements (one of the few allowed uses of <br>).
  • the stanzas of freeform poems are given by <pre> elements.

The gist of the thread was this; There is no <poem> element and there never will be. If you want to mark up a poem semantically then you have one of three options available to you:

  1. Use a <p> element which is as much a poem as <b> or <strong> is a heading
  2. Create your own "proprietary" markup (<poem>, <stanza>, and <line>) so you can join the same exclusive club as <blink> and <marquee>
  3. Stop reading poetry

The simple and unfortunate fact is this: you cannot mark up a poem (and a great many other pieces of information) in (X)HTML. You can make a piece of text "look" like a poem with a few <p> and <br> elements (just as you can make a piece of text "look" like a heading with a <strong> element), but it IS NOT and WILL NEVER BE a poem.

Sorry Dr Hoffmann. Maybe we should all stick to prose.

Comment

Log in or Register to post a comment.

More

Read more posts by Robert Love

About the Author

I'm a web technologist, University lecturer and trainer based in Sydney, Australia. I'm particularly interested in standards-based web design and development using web standards such as XHTML, CSS and the DOM, and open-source software such as Linux, Apache, MySQL and PHP. When I'm not making websites, I like to tell other people how I think they should make websites. I have developed, and teach, a few training courses in web technologies offered through Learn4Life at The University of New South Wales, Sydney, Australia. I'm a member of the W3C HTML Working Group, the Web Industry Professionals Association and the Web Standards Group and can be found espousing my opinions on forums and in mailing lists. My wife and son enjoy the benefits of my full-time employment as Senior Developer with News Digital Media, and they wouldn't mind at all if you wanted to contact me with yet a further opportunity for me to get no sleep.

How to Become a Web Developer and Make Lots of Money Signified files complaint - an open letter to the Web community