gpt4 book ai didi

html - 如何在 HTML5 中(语义上)标记(剧院)脚本/播放

转载 作者:搜寻专家 更新时间:2023-10-31 08:19:38 25 4
gpt4 key购买 nike

如何在 HTML5 中(语义上)标记(剧院)脚本/播放?

由于显而易见的原因,如果搜索引擎不认为您指的是“播放声音”和“JavaScript”,则很难搜索“播放”和“脚本”。

我如何标记脚本(就像在给戏剧 Actor 的文档中一样),使其在语义上正确且易于设计样式?

例如,让我们以哈姆雷特的开头为例

Hamlet

ACT I

SCENE I Elsinore. A platform before the castle.

[FRANCISCO at his post. Enter to him BERNARDO]

BERNARDO Who's there?

FRANCISCO Nay, answer me: stand, and unfold yourself.

很明显,我认为,应该从

开始
<h1 id="title">Hamlet</h1>
<h2 id="act-1">Act 1</h2>
<h3 id="scene-1">Scene 1</h3>

但是,然后我卡住了。

我试过查看 MicroData,但 Schema.org 的 CreativeWork[0] 确实没有包含很多对虚构作品有用的内容。

光说就够了吗

<p class="stage-direction">FRANCISCO at his post. Enter to him BERNARDO</p>
<p id="1"><span class="character bernardo">BERNARDO</span>Who's there?</p>
<p id="2"><span class="character francisco">FRANCISCO</span>Nay, answer me: stand, and unfold yourself.</p>

或者是否有更好/更明智的做事方式?

[0] http://schema.org/CreativeWork

最佳答案

似乎放弃了为对话精确指定标记的想法,W3C 现在只提供some guidelines which pretty much equate to your idea of using paragraphs and spans。 .

请注意,以前推荐的 dl 元素现在绝对使用:"The dl element is inappropriate for marking up dialogue" .

当然,这一切都可能在下周、下个月或下一年发生变化……

关于html - 如何在 HTML5 中(语义上)标记(剧院)脚本/播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16499174/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com