Sunday, June 22, 2014

HTML - Example Source Code for Forms

<form action="" name="registration">
<fieldset>
<legend>Background Details</legend>
<label for="name">Name:</label>
    <input type="text" name="name">
<label for="gender">Gender:</label>
    <input type="radio" name="gender" value="Male"> Male
    <input type="radio" name="gender" value="Female"> Female
<label for="age">Age range:</label>
    <input type="checkbox" name="age" value="18-30"> 18-30
    <input type="checkbox" name="age" value="31-40"> 31-40
    </fieldset>
 
<fieldset>
<legend>Additional Information</legend>
<label for="password">Password:</label>
    <input type="password" name="password">
<label for="resume">Resume Upload:</label>
    <input type="file" name="resume">

<label for="color">Favorite color:</label>
    <select name="color" size="3"><option value="red">Red</option>
        <option value="blue">Blue</option>
        <option value="green">Green</option></select>
</fieldset>
<input type="submit" value="Submit">
Result of the code above :

Background Details Male Female 18-30 31-40
Additional Information

No comments: