Skip to main content
Form part 3
Form Elements
If we change the input type to radio, it allows the user select only one of a number of choices:
<input type="radio" name="gender" value="male" /> Male <br />
<input type="radio" name="gender" value="female" /> Female <br />Try It Yourself
Result:
The type "checkbox" allows the user to select more than one option:
<input type="checkbox" name="gender" value="1" /> Male <br />
<input type="checkbox" name="gender" value="2" /> Female <br />Try It Yourself
Result:
The <input> tag has no end tag.
Comments
Post a Comment