View Single Post
Old 09-29-2009, 11:24 PM   #45
quillaja
Connoisseur
quillaja began at the beginning.
 
quillaja's Avatar
 
Posts: 79
Karma: 42
Join Date: Sep 2009
Device: sony reader touch (prs-600)
i posted this in the forum, but am pasting it here in the 'repository'.
---
using the definition list <dl></dl> works really well for plays. it's also better xhtml, since it defines the relationship between the speaker's name and his or her dialog in a way that using simple paragraphs does not. of course, you can further customize these tags with CSS.

definition list is used as such:
Code:
<dl>
<dt>term</dt><dd>definition</dd>
<dt>term</dt><dd>definition</dd>
</dl>
you can also have multiple consecutive <dt> and <dd>.

for example:
Code:
<p><em>JobberA and JobberB enter</em></p>
<dl>
<dt>JobberA</dt>
<dd>Wow, I really love e-books!</dd>
<dt>JobberB</dt>
<dd>Indeed! I do declare they are good. In fact, I will sing their praises!
  <p><em>JobberB sings.</em></p>
  <blockquote>
    e-books are really great<br/>
    ded-tree books i now do hate.
  </blockquote>
</dd>
</dl>
<p><em>Exit all.</em></p>
You'll notice that in JobberB's part, another <p> and <blockquote> are nested.

I also like to make the speaker names bold, because sony reader doesn't automatically format the <dt> to be bold, as most web browsers do (i think).

anyway, just thought i'd throw this tidbit out there. i used it in some books i published on feedbooks.

As GRiker said, <dl> might also be nice for a table of contents, where <dt> holds the link and <dd> holds a description.
quillaja is offline   Reply With Quote