These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:11 pm Advanced search

semantic markup for the <discussion> web?

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

semantic markup for the <discussion> web?

Postby milki » Sat May 08, 2010 2:43 am

Hi!
There were a lot of articles lately about the new and exciting markup features of HTML5. But I've been wondering about how the new tags can be applied.
More specifically, what semantic tags are recommended for discussions? (as in forums / bulletin boards / blog comments)

article web
For the article/book/publishing web, there are <article> and <section> and <nav> and <header>, which apply a pretty senseful semantic structure for authored publications.

But say, if you had a blog. You spent time on a lengthy structured scientific text, lots of sections, headlines and stuff. But you also want to allow user comments. While you might want that discussion to belong on that page, you don't want to convey that the comments belong to the article itself; or were authored by the publisher (as the page meta tags claim). So at least you'd structurally separate it with </article> and </section> ends, and have comments flow below.
As of today, you'd have to just use <div>s for comments/discussions. So there is little semantics in there.
( A search engine might e.g. treat the <article> as the real content and consider the <div>s just decorative content, design markup, spam links or whatever. )

markup options for comments
So, what might be a good option here for designating parts of a page as contributed commentary?

Clearly, I shouldn't have two <article/> parts on one web page.

And I'm not sure, if using <section class="comments"> clearly separates the non-article comments sementically from the authored text. Section seems to convey that it is in fact authored content.

But <aside> seems useful for comments, because comments are principally small additions to or about the page content. I'm just not sure if it was made for that. Asides are more like footnotes. And abusing it to mark up comments might also conflict with default user stylesheets (aside floating right).

I remeber some older comment systems, which just used <blockquote> in lieu of a real markup for comments. Seemed to work fine, and it almost has the right semantic meaning. Yes, not exactly right. Yes, it's actually wrong if I think about it. But if you want to technically express that some text block on your page was not written by you, then <blockquote> fills that semantic need. (Applies to <q> maybe, but blockquote seems better for multi-line comments.)
Many wikis are still using blockquote for discussions. Though that's more a lazyness-related and technical outcome of most wiki markups.

which approach?
How would you mark up the comments in a blog? Which of the html5 tags is fit for that?

What markup should a bulletin board or a threaded discussion forum software use?
If you only have comments in a forum, then maybe each small post is technically an <article> in itself. Because in a board/forum-only website you don't have that separation between real article and just comments.

And of course, there is nothing evil in simply using layout tables in a board view like this. And likewise the <ul><li>-nesting in threaded forums seems semantically better than boring <div>s.

So the article-ish web is well covered in HTML5. But we also have the forum/discussion web today. However there is no designated or agreed markup for that. Wouldn't something like <comment> or ??? be useful even?
milki
<h6>
 
Posts: 2
Joined: Sat May 08, 2010 1:12 am

Postby TabAtkins » Mon May 17, 2010 4:21 pm

Clearly, I shouldn't have two <article/> parts on one web page.

Sure you can. That's perfectly valid, and the sensical thing to do for comments. The HTML5 spec even gives an examples of markup to use for comments on an article at http://www.whatwg.org/specs/web-apps/cu ... le-element.

There, the suggested markup is to put each comment in an <article>, and have all of them be nested in a <section> of the top-level <article>.
TabAtkins
<h6>
 
Posts: 3
Joined: Mon May 17, 2010 4:01 pm

Postby onlineconnect » Fri May 21, 2010 1:39 am

I found an example of this below at : http://html5doctor.com/the-article-element/ , but its horrible mark up imho. I think if there adding elements an element for <comment> would do this better.

An <article> with comments as nested <article>s
This example shows a weblog entry with comments. Each comment can be marked up as an <article> within the containing <article>.
<article>
<header>
<h1>Apple</h1>
<p>Published: <time pubdate datetime="2009-10-09">9th October, 2009</time></p>
</header>
<p>The <b>apple</b> is the pomaceous fruit of the apple tree...</p>
...

<section>
<h2>Comments</h2>
<article>
<header>
<h3>Posted by: Apple Lover</h3>
<p><time pubdate datetime="2009-10-10T19:10-08:00">~1 hour ago</time></p>
</header>
<p>I love apples, my favourite kind are Granny Smiths</p>
</article>

<article>
<header>
<h3>Posted by: Oranges are king</h3>
<p><time pubdate datetime="2009-10-10T19:15-08:00">~1 hour ago</time></p>
</header>
<p>Urgh, apples!? you should write about ORANGES instead!!1!</p>
</article>
</section>
</article>
onlineconnect
<h6>
 
Posts: 8
Joined: Sat May 15, 2010 10:44 pm
Location: uk


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests