开发者

Semantically-rich markup for discussions in HTML5

开发者 https://www.devze.com 2023-02-21 03:03 出处:网络
At the moment, I\'m marking up a play in HTML5, and trying to use the most semantically-rich markup available. There\'s plenty of information online about using the <dialog> tag for this; unfort

At the moment, I'm marking up a play in HTML5, and trying to use the most semantically-rich markup available. There's plenty of information online about using the <dialog> tag for this; unfortunately, that tag h开发者_C百科as been removed from the draft standard as of September 2009.

WHATWG's recommendation for marking up conversations strikes me as somewhat less than ideal from a semantic perspective. Is there another option, or do I just need to look into Microformats/RDFa for this?


can't you just use an article? :) that is what comes the closest to what you want. HTML5 is kind of general, they cannot make tags for everything and article just shows the main content :).


I think the <p> tag is semantically most appropriate for this purpose. Every dialogue is a paragraph. Each person gets his/her own paragraph each time he/she speaks. This additional information can be added using HTML5 data-attributes or microformats.

eg.

<p><span class="fname">Praveen</span> : &quot; This is my dialogue. &quot;</p>
<p><span class="fname">Naveen</span> : &quot; and this is mine. &quot;</p>

PS: Using unordered, ordered, definition lists is wrong in this case.

0

精彩评论

暂无评论...
验证码 换一张
取 消