Semantics of comments

Most weblogs provide users the possibility to leave comments. Comments on weblog posts even have their own Comment API. Dimitri Glazkov started a discussion on his blog on the semantics of comments. He proposes to regard comment entries as definition lists (dl).

To me it is difficult to consider one comment as a list of definitions. I think it’s better to conceive a comment as a (small) article on it’s own. Therefore I would propose the following HTML for comments:


	<div class="comments">
		<h3>
			<a href="permalink">Comment Title</a>
		</h3>
		<p class="author">

			<a href="mailto:authorEmail">Author Name</a>
		</p>
		<p class="source">
			<a href="authorSiteUrl">Author Site</a>
		</p>

		<p class="description">
			Text of the comment
		</p>
	</div>

Some remarks:

  • The wrapper-div is arbitrary. It depends on your markup if you want to use it.
  • The header element h3 is also arbitrary. It depends on your markup whether you need a h2, h3 or something else.
  • Depending on your markup, you could get rid off some classes too.

I realise that our open.info.nl blog tool Wordpress offers another definition. Maybe it’s time to change it?

Tags: , , ,

4 Reacties op “Semantics of comments”

  1. Anne zegt:

    This does not seem to cover lists, quotes, code blocks, multi paragraphs and a lot of other type of comments.

  2. Tom zegt:

    Good point, Anne. I suppose you mean the case when a user inserts HTML (which is not always possible)? In that case you probably want to replace the paragraph tag I introduced for the comment description, with a list tag, a blockquote etc. You could check serverside if the comment description needs a wrapper-paragraph.

    I think this even more supports my idea that comments should be regarded as articles on their own.

  3. Dimitri Glazkov zegt:

    Guys, another good resource for more thinking is the microformats comments discussion:

    http://microformats.org/wiki/comments-formats

    At the moment, there are two proposals (nothing solid yet, I think)

    http://microformats.org/wiki/mfcomment
    http://microformats.org/wiki/hcomment

  4. werutzb zegt:

    Hi!

    I want to extend my SQL knowledge.
    I red so many SQL resources and want to
    read more about SQL for my work as oracle database manager.

    What can you recommend?

    Thanks,
    Werutz

Laat een reactie achter