Dimitri Glazkov

Beware of the Ubiquitous Baton53 days beforeLast night, somewhere in North London, a hollow object was launched from…Semantics of Comments

· 1 min read

Hey, what happened to June? You tell me.

Of Men with the Brain on Both Sides and a Utopian Cult2005One other thing that I had in my comment is an offer…Here’s a quick brainstormer: what would be the correct semantic markup of comments? The overarching structure is easy: list of comments is an ordered list, so we’ll use OL and LI elements to convey that.

What about the content of each comment? According to CommentAPI, here are the elements defined for each comment:

The last one is not really part of CommentAPI, but nevertheless important to have. Now, how would you express this in XHTML? My inclination is to treat this as a data row, and use DL element (DT for the title, individual DDs for all other content):

<ol class="comments"> <li> <dl> <dt> <a href="permalink">Comment Title</a> </dt> <dd class="author"> <a href="mailto:authorEmail">Author Name</a> </dd> <dd class="source"> <a href="authorSiteUrl">Author Site</a> </dd> <dd class="description"> Text of the comment </dd> </dl> </li> <li> ... </li></ol>

PHTML: Dumbing It Down For Sanity’s Sake2004If you have built large sites, you have faced a familiar maintenance…What a Nice Birthday Present!the same dayI knew it! You guys were waiting for my birthday!What about using CITE and BLOCKQUOTE? Are we really citing and quoting here? Any other semantics that might need to be conveyed? Thoughts, critiques, and ideas are appreciated.