WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: valid code for LABEL?

for

From: Patrick H. Lauke
Date: May 2, 2005 2:17PM


Glenda wrote:

> Would this be a valid fix?
>
> <TR>
> <TD vAlign="middle" align="right"><LABEL for="TextEmail">Email&nbsp;</TD>
> <TD><input name="TextEmail" id="TextEmail" type="text" class="portalsearch"
> maxlength="50" size="14" /><LABEL></TD>
> </TR>
>
> Can a LABEL span across two cells like this?


Absolutely not.

> Or is it better to forgo the
> label in this case?


What's wrong with the following?

<TD vAlign="middle" align="right">
<LABEL for="TextEmail">Email</LABEL>
</TD>

<TD>
<input name="TextEmail" id="TextEmail" type="text"
class="portalsearch" maxlength="50" size="14" />
</TD>

--
Patrick H. Lauke
_____________________________________________________
re