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:
- Use a
<p>element which is as much a poem as<b>or<strong>is a heading - Create your own "proprietary" markup (
<poem>,<stanza>, and<line>) so you can join the same exclusive club as<blink>and<marquee> - 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.
Pingback: Web Designer Notebook » Styling a Poem with Advanced CSS Selectors
Pingback: Styling a Poem with Advanced CSS Selectors | Blue Blog