Discussion:
[whatwg] HTML tags for POEM and MUSIC LYRICS
GevCbmlGM
2017-11-26 16:59:49 UTC
Permalink
Hi,

Is there any recommend standard HTML tags for POEM and MUSIC LYRICS?

I searched and did not see anyone talk about it.
But I see different creative way people come up for POEM / STANZA / LINE

1.
<BLOCKQUOTE> <P> <BR>

2.
<UL> <P> <BR>

3.
<DIV> <DL> <DD>

4.
<PRE> then text with line brakes and proportional font using CSS styling.

I wish it to be standardized, so if no recommendation exist, I suggest
following tags.
<POEM> - With left/right intend from margin, and zero top/bottom
margin (almost BLOCKQUOTE).
<STANZA> - With top/bottom margin, but zero left/right margin (similar to <P> ).
<L> this is for LINE, single character tag name to replace use of BR.
Content in<L> tag should not word wrap, instead it should continue
right side like contents in <PRE> tag.

We also need a set of tags for MUSIC LYRICS, with VERSE, CHORUS,
tag/attribute to mark repetition. As well as other tags/attributes
which music community thinks will be needed.


Cheers
Gev C

[bijugc]

(further research https://en.wikipedia.org/wiki/Song_structure )
Tab Atkins Jr.
2017-11-27 22:40:08 UTC
Permalink
Post by GevCbmlGM
Hi,
Is there any recommend standard HTML tags for POEM and MUSIC LYRICS?
I searched and did not see anyone talk about it.
But I see different creative way people come up for POEM / STANZA / LINE
1.
<BLOCKQUOTE> <P> <BR>
2.
<UL> <P> <BR>
3.
<DIV> <DL> <DD>
4.
<PRE> then text with line brakes and proportional font using CSS styling.
I wish it to be standardized, so if no recommendation exist, I suggest
following tags.
<POEM> - With left/right intend from margin, and zero top/bottom
margin (almost BLOCKQUOTE).
<STANZA> - With top/bottom margin, but zero left/right margin (similar to <P> ).
<L> this is for LINE, single character tag name to replace use of BR.
Content in<L> tag should not word wrap, instead it should continue
right side like contents in <PRE> tag.
We also need a set of tags for MUSIC LYRICS, with VERSE, CHORUS,
tag/attribute to mark repetition. As well as other tags/attributes
which music community thinks will be needed.
Poems and lyrics are, generally, just text that has significant
line-breaks. Thus, <p> and <br> are the correct markup for them.

For poetry that plays around with spacing and alignment (and thus has
significant whitespace), <pre> is the correct markup for it.

To add anything new to support these, head over to
<https://whatwg.org/faq#adding-new-features> and run thru the
questionaire there; the bar for new additions to HTML is relatively
high. In particular, merely wanting to encode more semantics into a
document is often not worthwhile - in general, semantics are only
useful insofar as they help machines understand the document (so they
can help humans more effectively, such as screenreaders, search engine
spiders, etc.). You'll have to answer to why this level of additional
semantics for poetry is valuable in this way, and how it improves over
the current situation in tools that actually exist (or make a *very*
convincing argument that the current lack of semantics *prevents* a
useful tool from existing, and it's likely that the tool will develop
on its own after this is added).

~TJ
Christoph Päper
2017-12-11 10:39:56 UTC
Permalink
Post by Tab Atkins Jr.
Post by GevCbmlGM
Is there any recommend standard HTML tags for POEM and MUSIC LYRICS?
Poems and lyrics are, generally, just text that has significant
line-breaks. Thus, <p> and are the correct markup for them.
As with <svg> and <math>, HTML could also add <music> or something similar to embed MusicXML. Lyrics are a subset of musical notation and poems are, arguably, a special kind of lyrics (or the other way around).

<https://github.com/w3c/musicxml>
<https://www.w3.org/community/music-notation/>
<https://www.w3.org/wiki/images/5/5e/MusicXML_W3C_Plenary_2014.pdf>
<http://www.musicxml.com/tutorial/the-midi-compatible-part/lyrics/>
Jirka Kosek
2017-12-11 12:30:33 UTC
Permalink
Post by Christoph Päper
As with <svg> and <math>, HTML could also add <music> or something similar to embed MusicXML. Lyrics are a subset of musical notation and poems are, arguably, a special kind of lyrics (or the other way around).
This would require change to HTML parsing rules which ideally shoudn't
ever happen again.

Easier approach is to use XHTML syntax and simply embedded fragment of
specific XML vocabulary. It's pity that extensibility has been largely
thrown away when HTML5 was designed.

BTW, MusicXML is really not appropriate for poems. There is existing
markup for poems in TEI: http://teibyexample.org/modules/TBED04v00.htm

Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: ***@kosek.cz http://xmlguru.cz
------------------------------------------------------------------
Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
Bringing you XML Prague conference http://xmlprague.cz
------------------------------------------------------------------
Michael A. Peters
2017-12-11 14:29:58 UTC
Permalink
Post by Jirka Kosek
Post by Christoph Päper
As with <svg> and <math>, HTML could also add <music> or something similar to embed MusicXML. Lyrics are a subset of musical notation and poems are, arguably, a special kind of lyrics (or the other way around).
This would require change to HTML parsing rules which ideally shoudn't
ever happen again.
Easier approach is to use XHTML syntax and simply embedded fragment of
specific XML vocabulary. It's pity that extensibility has been largely
thrown away when HTML5 was designed.
I always serve my pages as application/xhtml+xml except when an honest
bot asks for the page (Twitter, some accessibility testers, Google Page
Speed, all have trouble with real XML - often either screwing up with
the self-closing script tags or parsing it correctly as XML but adding
junk after the closing tag somewhere in their processing)

I've not tried as I don't think browsers would know what to do, but one
should be able to add other XML namespaces to html5 served as proper
XML, no?

That's how we had to to MathML circa 2000 before HTML5 (and then if I
recall only Mozilla knew what to do with the MathML) - the same thing
should work if browsers knew what to do with MusicXML or whatever.
Brian Kardell
2017-12-11 15:40:03 UTC
Permalink
Post by Jirka Kosek
Post by Christoph Päper
As with <svg> and <math>, HTML could also add <music> or something
similar to embed MusicXML. Lyrics are a subset of musical notation and
poems are, arguably, a special kind of lyrics (or the other way around).
This would require change to HTML parsing rules which ideally shoudn't
ever happen again.
Easier approach is to use XHTML syntax and simply embedded fragment of
specific XML vocabulary. It's pity that extensibility has been largely
thrown away when HTML5 was designed.
I always serve my pages as application/xhtml+xml except when an honest bot
asks for the page (Twitter, some accessibility testers, Google Page Speed,
all have trouble with real XML - often either screwing up with the
self-closing script tags or parsing it correctly as XML but adding junk
after the closing tag somewhere in their processing)
I've not tried as I don't think browsers would know what to do, but one
should be able to add other XML namespaces to html5 served as proper XML,
no?
That's how we had to to MathML circa 2000 before HTML5 (and then if I
recall only Mozilla knew what to do with the MathML) - the same thing
should work if browsers knew what to do with MusicXML or whatever.
Sorry, I've read through a bunch of stuff mentioned here trying to not ask
a question with an obvious answer, but I'm not finding it so: Why exactly
would this need parser change? Is there a reason that you could you not
float custom elements that did/meant precisely what you want to help prove
that whatever particular formulation you've come up with is the set that
should be used/integrated into an HTML standard?
--
Brian Kardell :: @briankardell
Loading...