Page 1 of 1

What xhtml element to use?

Posted: Fri Sep 01, 2006 12:36 pm
by seodevhead
I have a message posting board, similar to a very simple forum. And it lists the title of the message, a snippet and then under that it simply says:

"Posted By: {username here}"

Since this "posted by" line is a block level element (on its own line) I am now wondering what xhtml element(s) to assign to this?

I had it originally in a <p> tag but it certainly is not a paragraph. The only other option I can see is using a <dl> definition list perhaps... kinda like:

<dl><dt>Posted By:</dt><dd>{username here}</dd></dl>

Any suggestions as to what I should use? I want to comply with web standards/accessibility as much as humanly possible. Thanks.

Posted: Fri Sep 01, 2006 1:23 pm
by volka
fieldset/label, div, table/th ?

Posted: Tue Sep 05, 2006 3:54 am
by chenggn
:D

yeah, why not put it inside a table cell. just like phpbb and many other forums.

Posted: Tue Sep 05, 2006 5:27 am
by matthijs
I would think a p is fine. It's just a short paragraph. Give the p a class to be able to style it. Otherwise you could use a div.

To make it even more difficult: you could also place everything in a list. It is a list of messages isn't it? But the drawback of that is that it might be a bit challenging to get everything the way you want it to look. I guess that's why most forums still use tables.

Posted: Tue Sep 05, 2006 5:37 am
by Weirdan

Posted: Tue Sep 05, 2006 6:20 am
by matthijs
[ ... drums rolling ... ]
Aaaaand, Weeeeirdan wins and goes on for the washing machine!!!!
:)