用HTML表示舞台脚本的最佳方法是什么

用HTML表示舞台脚本的最佳方法是什么

本文介绍了用HTML表示舞台脚本的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个草图想放在自己的网站上,我也打算在某个时候写一个短剧,我也想免费提供它.

I have a sketch that I want to put up on my website, and I also intend to write a short play at some point which I'd also want to make freely available.

我正在尝试找出用HTML表示此问题的最佳方法.我基本上需要两列-一列用于说话的角色,一列用于文本.每个演讲显然都需要与演讲者保持一致.换句话说,是这样的:

I'm trying to work out the best way of representing this in HTML. I basically need two columns - one for the character speaking, and one for the text. Each speech obviously needs to line up with the speaker though. In other words, something like this:


    Jeff        This sure is a nice website we've got now.

    Joel        It certainly is. By the way, working at FogCreek rocks.

    Jeff        Of course it does. Have you played Rock Band yet? It's
                 a lot of fun.

(好于lorem ipsum ...)

(Well it's better than lorem ipsum...)

我知道如何使用HTML表(每条语音有一个表行)来做到这一点,但这似乎很丑陋,而且每个人当然似乎都热衷于使用CSS来表示非表格数据.我看不到它是如何真正计算表格数据的-我之前使用的行"和列"与布局有关,而不是与基本数据有关.

I know how I could do this with HTML tables (with one table row per speech) but that seems pretty ugly, and everyone certainly seems to be keen on using CSS to represent non-tabular data. I can't see how this really counts a tabular data - my use of "row" and "column" earlier was to do with the layout rather than the fundamental data.

那么,有什么想法吗?我认为我见过的大多数脚本网站(不多,诚然)都像上面的示例一样使用<pre>,或者不用理会保持正常的脚本格式,而只是在每个段落的前面加上说话者的名字. (有关此样式的示例,请参阅播客Wiki.)坦白地说,我什至无法确定应该使用哪些HTML元素来表示这种样式-字典定义列表,其中以说话者为术语,以语音为定义可能是我所想到的最接近的方法,但这感觉就像是滥用.

So, any ideas? I think most of the script websites I've seen (not many, admittedly) either use <pre> like my example above, or don't bother trying to keep the normal script format, instead just prefixing each paragraph with the speaker's name. (See the podcast wiki for an example of this style.) I'm having trouble working out even what HTML elements I should be using to represent this, frankly - a dictionary definition list with the speaker as the term and the speech as the definition is probably the closest I've thought of, but that feels like abuse.

推荐答案

我第二次出现异端:-)

I second the heresy :-)

在使用表之前总是考虑CSS-但表确实确实是最合适的.在这种情况下看起来像这样.

Always good to consider CSS before resorting to tables - but often tables really are the best fit. It looks like it in this case.

唯一需要考虑的是可访问性.我听说表格使文本阅读器软件更难以处理表格,但是我不明白为什么会这样(如果您了解更多,请在此处随意评论).

The only additional consideration would be accessibility. I've heard that tables make it harder for text reader software to process tables, but I don't see why this would be the case (feel free to comment here if you know more).

另一件事-我想您会首先以其他某种格式保存原始数据-也许是数据库,xml或其他结构化文本?

One other thing - I presume you'd be holding the raw data in some other format first - perhaps a database, or xml or some other structured text?

在任何情况下,使用这些东西将其转换成xml格式并将其转换为html都可以相当解放.

In any case, getting it into an xml format and tranforming that to html with xslt can be quite liberating when it comes to playing with this stuff.

这篇关于用HTML表示舞台脚本的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 18:30