Dimitri Glazkov

Web and About

Semantics of Comments

leave a comment »

Hey, what happened to June? You tell me.

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:

  • title — title of the post
  • link — link to the home page of comment author
  • description — text of the comment
  • author — email of the comment author
  • source — name of the comment author’s site (blog)
  • dc:creator — name of the comment author
  • permalink — permanent URL of the 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">
    <a href="permalink">Comment Title</a>
   <dd class="author">
    <a href="mailto:authorEmail">Author Name</a>
   <dd class="source">
    <a href="authorSiteUrl">Author Site</a>
   <dd class="description">
    Text of the comment

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.

Written by Dimitri Glazkov

July 13, 2005 at 9:17 am

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: