W3C home > Mailing lists > Public > www-html@w3.org > April 2002

Single label for 2 inputs?

From: PERRY, Grant <Grant.Perry@qed.qld.gov.au>
Date: Mon, 29 Apr 2002 14:47:56 +1000
Message-ID: <F4053AE9533F5E43BF1325E54126D73A011FA887@sae68490004>
To: www-html@w3.org
Hello,

I wish to use the same label for 2 separate inputs but what to know how or
if it is even allowed.

Example:
I have a form with 5 options the last being 'other:' with an option to enter
the 'other' in a type="text". Now can I use the one label tag or should I
use two or shouldn't I do this at all.

e.g.

<input type="text" id="option21" name="option21" maxlength="1" size="1">
<label for="option21,other"><strong>Other:</strong></label>
<input type="text" id="other" name="other" maxlength="30">

-OR-

<input type="text" id="option21" name="option21" maxlength="1" size="1">
<label for="option21"><label
for="other"><strong>Other:</strong></label></label>
<input type="text" id="other" name="other" maxlength="30">

Thanks,
Grant Perry
AccessEd - Education QLD - Australia
Received on Monday, 29 April 2002 02:29:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:51 GMT