john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

html form replace button with image and label for

This is how you replace an form button with an image
<input type="image" src="picture.gif" name="optional">

Using the label element allows the user to click on the text associated with the form control instead of having to click the radio button, check box, select box, etc.

<label for="radio1">This Radio Button 1 has a label associated with it.</label><input type="radio" value="Selected" name="Radio" id="radio1">

<label for="first_name">First Name</label>
<input  id="first_name" maxlength="40" name="first_name" size="20" type="text" />

<label for="last_name">Last Name</label>
<input  id="last_name" maxlength="80" name="last_name" size="20" type="text" />

  • « html form validation
  • javascript validation email checkbox »

Published

Feb 6, 2010

Category

web

~80 words

Tags

  • and 29
  • button 10
  • for 18
  • form 20
  • html 23
  • image 8
  • label 1
  • replace 7
  • web 56
  • with 29