[html5] What is the purpose of the form attribute on <label>

Futomi Hatano info at html5.jp
Wed Dec 2 20:50:57 PST 2009


Hi all,

I have a question about the purpose of the form attribute on <label>.
Could you please see the snippet?

<p>
 <label form="frm">
  nickname: <input type="text" name="nickname" />
 </label>
</p>
<form method="get" action="#" id="frm">
 <input type="submit" value="送信" />
</form>

Does the <input> for the nickname have a form owner?
Intuitively, it seems to have a form owner.
But, as far as I've read the spec, it seems to have no form owner.
Actually,Opera 10 dose so.
http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#attr-fae-form
"5. Otherwise, the element is left unassociated."

Could you please tell me whether the <input> for nickname have a form owner?

If it dose, Where dose the spec clearly say?
If not, What the purpose of the form attribute on <label>?
For only semantics? or for something else?

Thank you.

--
Futomi Hatano
www.html5.jp




More information about the Help mailing list