WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: <label> element

for

From: Paul Bohman
Date: Mar 29, 2002 1:39PM


Ok, I need to post a correction:

In my last post I said that the LABEL tag "can be anywhere *within the
form tags*. The label tag means nothing outside of a form: it is a child
element of the form tag."

After receiving an off-list prompt from Jim Thatcher, I looked up the
HTML specs and it appears that LABEL tags can exist outside of FORM
tags. In fact, any form element (drop-down boxes, text input areas,
submit buttons, etc.) can exist outside of form tags, but they will
probably not work if the purpose of the form elements is to submit
information back to the server (and they will not show up at all in
Netscape 4.x). If you want the form to perform its proper function, the
form elements will need to be inside of the FORM tags, under most
circumstances.

So I guess you could put the LABEL tag anywhere on the page, not just
within the form. I still don't recommend it, but it appears that it can
be done.

Thanks Jim, for keeping me on my toes ;-)

Paul Bohman
Technology Coordinator
WebAIM (Web Accessibility in Mind)
www.webaim.org
Center for Persons with Disabilities
www.cpd.usu.edu
Utah State University
www.usu.edu




----
To subscribe, unsubscribe, or view list archives,
visit http://www.webaim.org/discussion/