One reason not doing it is probably because IE only supports
explicitly associated labels.

--Klaus



On 9 Mrz., 04:13, Karl Swedberg <k...@englishrules.com> wrote:
> having the input inside the label is perfectly valid.
>
> http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1
>
> "To associate a label with another control implicitly, the control  
> element must be within the contents of the LABEL element. In this  
> case, the LABEL may only contain one control element. The label itself  
> may be positioned before or after the associated control."
>
> I don't prefer doing it this way for my own sites, but it's not  
> incorrect.
>
> --Karl
>
> ____________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> On Mar 8, 2009, at 9:49 PM, David Muir wrote:
>
>
>
> > And why is the input within the label?
>
> > I was under the impression that the correct format is:
> > <label>My Label</label><input type="checkbox" />
>
> > To have the label select the checkbox:
> > <label for="my-checkbox">My Label</label><input id="my-checkbox"  
> > type="checkbox" />
>
> > David
>
> > MorningZ wrote:
> >> is there any reason why you couldn't use a <span> instead of a
> >> <label> ?
>
> >> On Mar 8, 8:57 pm, Bill <bllfr...@gmail.com> wrote:
>
> >>> I have markup that looks like this:
>
> >>> <div id="phrase:witness%2Bwhereof" class="as-s-comp">
> >>>    <label class="checkbox" title="witness whereof">
> >>>        <input type="checkbox" value="witness whereof"/>
> >>>        witness whereof
> >>>    </label>
> >>>    <a class="cl" href="#">(4104)</a>
> >>> </div>
>
> >>> When I click anywhere within the label, the checkbox toggles from  
> >>> its
> >>> previous state. I'd like to cancel this behavior, so that clicking
> >>> within the label has no effect on the checkbox. How would I use  
> >>> jQuery
> >>> to accomplish this?
>
> >>> Thanks in advance for any help with this.
>
> >>> --Bill
>
>

Reply via email to