WebAIM - Web Accessibility In Mind

E-mail List Archives

valid code for LABEL?

for

From: Glenda
Date: May 2, 2005 2:20PM


As this code is missing a LABEL:

<TR>
<TD vAlign="middle" align="right">Email&nbsp;</TD>
<TD><input name="TextEmail" id="TextEmail" type="text" class="portalsearch"
maxlength="50" size="14" /></TD>
</TR>


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? Or is it better to forgo the
label in this case?

Cheers,
Glenda