hi all, i''m a ror newbie and so hope you don''t mind this simple question. i was looking at an rhtml file for a form when i ran across this html code: <label for="user_username">Username:</label> what is the <label for=...> tag used for? many thanks for your help! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you specify the id of an element in your page, when you click the label it will transfer focus to that element :-) Try it: <label for="foo">Click me!</label> <input type="text" id="foo"> dparkmit wrote:> hi all, > > i''m a ror newbie and so hope you don''t mind this simple question. i > was looking at an rhtml file for a form when i ran across this html > code: > > <label for="user_username">Username:</label> > > what is the <label for=...> tag used for? many thanks for your help! > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
thanks! does it do anything else besides that? On Jul 31, 4:35 am, Cliff Rowley <cliffrow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you specify the id of an element in your page, when you click the > label it will transfer focus to that element :-) > > Try it: > > <label for="foo">Click me!</label> > <input type="text" id="foo"> > > dparkmit wrote: > > hi all, > > > i''m a ror newbie and so hope you don''t mind this simple question. i > > was looking at an rhtml file for a form when i ran across this html > > code: > > > <label for="user_username">Username:</label> > > > what is the <label for=...> tag used for? many thanks for your help!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
dparkmit wrote:> thanks! does it do anything else besides that? >Nope, but you can style it as a CSS element ;-) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 7/31/07, dparkmit <dparkmit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > thanks! does it do anything else besides that? >It''s probably very helpful for people with disabilities. Your question is strictly about HTML, by the way. You may get better feedback from a mailing list / usenet group specific to that topic. There''s also the w3c consortium''s web site, where you can find the full html specifications; see http://www.w3.org/ HTH, Isak> On Jul 31, 4:35 am, Cliff Rowley <cliffrow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > If you specify the id of an element in your page, when you click the > > label it will transfer focus to that element :-) > > > > Try it: > > > > <label for="foo">Click me!</label> > > <input type="text" id="foo"> > > > > dparkmit wrote: > > > hi all, > > > > > i''m a ror newbie and so hope you don''t mind this simple question. i > > > was looking at an rhtml file for a form when i ran across this html > > > code: > > > > > <label for="user_username">Username:</label> > > > > > what is the <label for=...> tag used for? many thanks for your help! > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Isak Hansen wrote:> On 7/31/07, dparkmit <dparkmit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > It''s probably very helpful for people with disabilities. > > Your question is strictly about HTML, by the way. You may get better > feedback from a mailing list / usenet group specific to that topic. > > There''s also the w3c consortium''s web site, where you can find the > full html specifications; see http://www.w3.org/Sorry to prolong the pain... but the instructions for the Ajax / prototype (the thing that does auto complete in particular) tells you to put a label for the element that the drop down list applies to. I''m not clear exactly what the label provides that the id of the element does not. Come someone explain it to me or point me to a page that does? Thanks, Perry -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jul 31, 2007, at 7:44 AM, Cliff Rowley wrote:> dparkmit wrote: >> thanks! does it do anything else besides that? >> > Nope, but you can style it as a CSS element ;-)In some browsers, radio button and checkbox controls can be clicked on the label in addition to the control itself. -Rob Rob Biedenharn http://agileconsultingllc.com Rob-xa9cJyRlE0mWcWVYNo9pwxS2lgjeYSpx@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 7/31/07, Isak Hansen <isak.hansen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 7/31/07, dparkmit <dparkmit-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > thanks! does it do anything else besides that? > > > > It''s probably very helpful for people with disabilities. > > Your question is strictly about HTML, by the way. You may get better > feedback from a mailing list / usenet group specific to that topic. >Or, you could go to the official source ... the HTML specification, which describes all of the legal elements and attributes[1]. I find the "Index of Elements" and "Index of Attributes" links at the bottom of the Table of Contents to be incredibly useful reference sources, and have them both bookmarked. Craig [1] http://www.w3.org/TR/html4/> There''s also the w3c consortium''s web site, where you can find the > full html specifications; see http://www.w3.org/ > > HTH, > Isak > > > > On Jul 31, 4:35 am, Cliff Rowley <cliffrow...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > If you specify the id of an element in your page, when you click the > > > label it will transfer focus to that element :-) > > > > > > Try it: > > > > > > <label for="foo">Click me!</label> > > > <input type="text" id="foo"> > > > > > > dparkmit wrote: > > > > hi all, > > > > > > > i''m a ror newbie and so hope you don''t mind this simple question. i > > > > was looking at an rhtml file for a form when i ran across this html > > > > code: > > > > > > > <label for="user_username">Username:</label> > > > > > > > what is the <label for=...> tag used for? many thanks for your help! > > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---