DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   JavaScript / DHTML / AJAX (http://www.daniweb.com/forums/forum117.html)
-   -   Help with <label for = idref[CS]> (http://www.daniweb.com/forums/thread114559.html)

ryy705 Mar 18th, 2008 2:11 pm
Help with <label for = idref[CS]>
 
Hello,
I am trying to understand html's <label> attribute. According to http://www.w3.org/TR/html4/interact/forms.html#h-17.9
when I am using a single label for multiple elements I should use the following format: label for = idref [CS]. From what I understand [CS] represents names of the elements that I am labeling. But what is idref? What am I suppose to put there? Would someone kindly post a small example please?

digital-ether Mar 20th, 2008 2:15 am
Re: Help with <label for = idref[CS]>
 
Quote:

Originally Posted by ryy705 (Post 563924)
Hello,
I am trying to understand html's <label> attribute. According to http://www.w3.org/TR/html4/interact/forms.html#h-17.9
when I am using a single label for multiple elements I should use the following format: label for = idref [CS]. From what I understand [CS] represents names of the elements that I am labeling. But what is idref? What am I suppose to put there? Would someone kindly post a small example please?

I don't believe labels can be used for multiple FORM elements.

The idref should be the value of the id attribute of the FORM element for which the label is for. The [CS] stands for Case Sensitive. Since IDs are CS also.

So a label can only be for a single element, since you cannot have two IDs of the same value in an XHTML document.

ryy705 Mar 21st, 2008 10:55 pm
Re: Help with <label for = idref[CS]>
 
Thanks

digital-ether Mar 22nd, 2008 10:29 am
Re: Help with <label for = idref[CS]>
 
Quote:

Originally Posted by ryy705 (Post 566509)
Thanks

you're welcome. :)


All times are GMT -4. The time now is 6:21 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC