Re: forms - checkbox labels and wrapping

Walter Ian Kaye wrote:
> 
> There's a problem with forms, specifically checkboxes and radio buttons,
> where the text associated with the item wraps separately. I've tried  
> between them, I've tried Netscape's <nobr> element, but there does not seem
> to be any way to bind them together. It's too bad we never had a label=
> attribute for <input>, as that would have prevented the problem (and would
> have allowed RTL direction for RTL languages to be automatic, layout-wise).

It's too bad we didn't have them from the beginning, but we do have
them. They've been a W3C recommendation since Dec 1997. The current
spec is:

17.9 Labels
http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#h-17.9

[[[
In this example, we implicitly associate two labels with two text input
controls:

           <FORM action="..." method="post">
           <P>
           <LABEL>
              First Name
              <INPUT type="text" name="firstname">
           </LABEL>
           <LABEL>
              <INPUT type="text" name="lastname">
              Last Name
           </LABEL>
           </P>
           </FORM>
]]]

I think the idea was first published Apr 1997:

http://www.w3.org/TR/WD-forms-970402

-- 
Dan Connolly
http://www.w3.org/People/Connolly/

Received on Monday, 3 January 2000 22:01:49 UTC