views:

122

answers:

5

How to represent lyrics and corresponding translation strophe in HTML?

just an example:

Может, поздно, может, слишком рано,        Maybe, it's too late or, maybe, early, 
И о чем не думал много лет,                It has not occurred to me for years,
Походить я стал на Дон-Жуана,              I resemble now Don Juan, really,
Как заправский ветреный поэт.              Like a proper flippant man of verse.

How to represent it in SEO friendly and semantic way?

P.S.   I really hate solution with tables and don't want to put original line and translated in one container (I think it's ugly and bad for googgles).

+2  A: 

You use divs. You put each set of lyrics in a div tag and then use some CSS to format the two divs next to each other such as:

.lyrics {
 float: left;
}

There are a number of other CSS techniques that will do the same thing.

sixfoottallrabbit
+4  A: 

I would just leave off the English translations entirely. I think most music sounds more impressive if you can't actually understand what the singer is saying, and your example lyrics seem to verify this. :)

All seriousness aside, I would actually just alternate the original lyrics and the translation with different fonts, like so:

Je ne parle pas d'un bâtiment

[I do not speak a building]

请不要拍我

[Please do not shoot me]

MusiGenesis
+1 for not translating lyrics - literal translations of good lyrics often produce bad lyrics, and if the lyrics are bad in the original language...!
Steven A. Lowe
My favorite Elton John song is "Hold Me Closer, Tony Danza".
MusiGenesis
+1  A: 
Donut
Achtung! the dreaded unsemantic left and right classes!
annakata
Good catch; fixed.
Donut
much better ;)
annakata
+1  A: 

Hmmm. Semantically speaking I could see an argument for these being lists or paragraphs.

Me I think I'd go with something like this (apologies for code bloat):

<style>
.song
{
  background: #444;
  overflow: auto;
  zoom: 1.0;
  padding-bottom: 1em;
  border: 1px solid #000;
}

.song .lyrics
{
  float: left;
  color: #ddd;
  margin: 1em;
  width: 20em;
}

.song #russian.lyrics { background: #009; }

.song #english.lyrics { background: #090; }   

.song .lyrics p { margin: .5em .2em; }
</style>

<div class="song">
    <div id="russian" class="lyrics">
     <p>Может, поздно, может, слишком рано,</p> 
     <p>И о чем не думал много лет,</p>
     <p>Походить я стал на Дон-Жуана,</p>
     <p>Как заправский ветреный поэт.</p>
    </div>
    <div id="english" class="lyrics">
     <p>Maybe, it's too late or, maybe, early,</p>
     <p>It has not occurred to me for years,</p>
     <p>I resemble now Don Juan, really,</p>
     <p>Like a proper flippant man of verse.</p>
     </div>
</div>
annakata
I would be inclined to make both "russian" and "lyrics" classes in case there might be multiple songs on a page.
Chuck
Most of the lyrics sites I've seen are one song per page so I went with that approach - marginal call though it was. The OP is free to change that of course, should he even use this.
annakata
I don't think marking each line as a paragraph is right semantically. A <br> tag between each line would be better.
Alohci
No? My thinking here is that with lyrics each line is a distinct and self-important item, as in poetry, and not in prose.
annakata
Well, I think the same holds for poetry too. In fact line breaks in poetry are pretty much the canonical example of correct use of the <br> tag. See http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-br-element
Alohci
I don't think that link demonstrates canonicity here. I could eb persuaded either way I think - would make a good SO question if it wouldn't be such a flame-war/poll!
annakata
A: 

I actually think a table makes the most sense here.

Ms2ger