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> : " This is my dialogue. "</p>
<p><span class="fname">Naveen</span> : " and this is mine. "</p>
PS: Using unordered, ordered, definition lists is wrong in this case.
精彩评论