RE: forms - checkbox labels and wrapping

From: walter@natural-innovations.com, 01/04/2000 10:35 AM
> At 09:00p -0600 01/03/00, Dan Connolly wrote:
> >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
> 
> Gee, somehow I missed that. I wonder if any browsers make use 
> of it yet...

IE 5.0 does, and I try to use <label> wherever I can.  It doesn't hurt
the rendering on old browsers at all; it's an ideal extension.
(Another ideal extension in html4 is <A title="">.  Wonderful.)

There is still the problem of making sure the label stays next to the
checkbox, though.  <label> doesn't do this.

Since the dawn of time (well, 1994 anyway) tables have been used
to align form elements - and everything else, for that matter.
You can use a table to make sure the checkbox and its label appear
together.  You can still use a <label> to make the text clickable
(see the first example in
http://www.w3.org/TR/html4/interact/forms.html#h-17.9.1)

I don't want to be using tables four years from now, though.  I
hope something better comes along.  (Better even than CSS, I hope.
Ask around on www-style@w3.org if you're curious.)

-- 
Jason

Received on Tuesday, 4 January 2000 12:35:00 UTC