<label> HTML element element

Possible duplicate:
Should I put an input tag inside the tag tag?

Is it possible to have an input element inside a label element to associate an input with a label? Example:

<label>Email Address: <input name="email" type="text" /></label>

Will major browsers link the label and untagged input controls for the specified attribute?

I have seen this done several times, but wondered if this is kosher HTML.

+3
source share
2 answers

According to this , everything seems to be in order. Will be tested in major browsers ...

+1
source

Source: https://habr.com/ru/post/1763140/


All Articles