struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Beal <>
Date Mon, 04 Apr 2005 18:02:51 GMT
On Apr 4, 2005 11:49 AM, Justin Morgan <> wrote:
> The label is supposed to be closed before the input tag.  IE is nicer

This is wrong.  The content model of LABEL includes all inline
elements, including form controls.  A few paragraphs before your link
on, they include the following example:

   First Name
   <INPUT type="text" name="firstname">
   <INPUT type="text" name="lastname">
   Last Name

This demonstrates that labels can be implicitly associated with form
controls contained within the label element.  As a sidenote, this is a
very useful construct that is *not* supported by IE.  Even with the
form control contained within the LABEL element, the for attribute is
still required to associate the label with the form control.

As for why the label element is not visible in NS 6.2, I don't know. I
just tried the same code in FireFox, and it seemed to work fine.  It
was probably a Netscape bug that has been fixed since 6.2.  If I had
to guess, I would say that labels for hidden form elements were also

Sunu --

 1) What do you see when you view source in the browser for both
Netscape and IE?
  2) What happens if you use an input type='text' instead of input
  3) Does it even make sense to have a label on a hidden form control?

Jeff Beal
Webmedx, Inc.
Pittsburgh, PA USA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message