Hi all,

I'm trying to decide on a nice semantic way to mark-up a short (usually only a few words) block of help text in the context of a web form. I currently use a label to label the input, and a paragraph or div to mark-up the help text:

<form...>
<div class='formitem'>
<label for='f-title'>...</label>
<input id='f-title' type='text'... />
<p class='help'>This is the title of your news post, which does not accept HTML input</p>
</div>
</form>


But logic tells me that in the above example, the <p> help text is not associated with the form widget or the label at all. The only way I can see this being done is by including the help text in the label, but this will restrict me in terms of layouts.

Honestly, the most logical way I can see to do this is to have them in three cells of a table row, since at least they'll be associated in a row. <fieldset>'s would also be nice, but they're intended for groupings of form elements, and using them for each text input seems like a load of bloat.

I've been looking at many examples of "correct, semantic forms", but can't see anything like this out there.

TIA

---
Justin French
http://indent.com.au

*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
*****************************************************




Reply via email to