HTML tag label is useful for Radio buttons

Radio Buttons

To click on a Radio button is very boring things to me. A radio button is maximum 15 x 15 pixels. So need extra care to click on Radio buttons.

When I work with Radio buttons in my web applications, I use HTML tag – ‘Label‘.

For example, I have a Radio button like this-

<div><input type="radio" name="test" id="test_id" value="something" /> Click on this Radio button </div>

This Radio button require extra care to click. I write the above code like bellow, so that the visitors can select the Radio button clicking on the text – “Click on this Radio button“.

<div><input type="radio" name="test" id="test_id" value="something" /> <label for="test_id"> Click on this Radio button</label> </div>

Now the visitors can select the Radio button clicking on the text. Enjoy easy clicking on the Radio buttons.

Share and Enjoy:
  • Facebook
  • Twitter
  • Google Bookmarks
  • Digg
  • del.icio.us
  • MySpace
  • LinkedIn
  • Live
  • Ping.fm
  • YahooMyWeb
  • Posterous
  • Sphinn
  • Mixx
  • DZone
  • email
  • Furl
  • StumbleUpon
  • Technorati
  • TwitThis
  • Webnews.de
  • Yahoo! Buzz
  • blogmarks
  • Yahoo! Bookmarks

6 Responses to “HTML tag label is useful for Radio buttons”

  1. Rahat Bashir Says:

    I think this is a cool tip. I thought sometimes to let users select radio options through radio buttons by clicking on the text of respective buttons but could not find the way.

  2. TRIVUz Says:

    Thanks for this Tips Arafat bhai… :)

  3. shuman Says:

    Nice & cooooool

  4. raju Says:

    yeah, we should do it if you consider user friendliness. thanks for tips.

  5. Mohammad Sajjad Hossain Says:

    Agree with Raju bhai. Thanks for sharing the tip.

  6. dhrobonil Says:

    this is a helpful for new coder like me.thank you for your nice post.

Leave a Reply