View Full Version : nicely formatted plays

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:

for example:
<p><em>JobberA and JobberB enter</em></p>
<dd>Wow, I really love e-books!</dd>
<dd>Indeed! I do declare the are good. In fact, I will sing their praises!
<p><em>JobberB sings.</em></p>
e-books are really great<br/>
ded-tree books i now do hate.
<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.

09-28-2009, 03:52 AM

In my bag, now. Thanks!

m a r

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!


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