View Full Version : nicely formatted plays


quillaja
09-28-2009, 03:28 AM
perhaps everyone knows this, but 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:
<dl>
<dt>term</dt><dd>definition</dd>
<dt>term</dt><dd>definition</dd>
</dl>

for example:
<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 the 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.

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

rogue_ronin
09-28-2009, 03:52 AM
Nifto-keen-a-rooni!

In my bag, now. Thanks!

m a r

GRiker
09-28-2009, 10:09 AM
This would also be useful for Table of Contents, with <dt> for the title (linked), and <dd> for a summary ...

Thanks for the tip!

G

quillaja
09-28-2009, 09:03 PM
yea, that sounds like a good use too. =)