Creating HTML forms


Creating HTML forms

creating html forms

creating html forms are use to collect data or information from users .Using html forms and the mixes of some php codes will allowed you to do so. U can create html form using <form> tag. Html forms contain form element, and are in different types of input elements such as check boxes, radio button, submit buttons, and many others. the <input> element is the most used element in creating html forms. It is an unpaired tag. You have to use attribute type with the <input> element to make it work.

types of type attribute: text,radio, password, checkbox, button, submit, color, date, datetime-local, email, number, range, search, tel, line url, weeks months, years, etc

examples as follow:

radio button input

Attribute type="text" is used in input element, it let the user to choose just one from some choices eg
<form>
<input type="radio" name="age" value="baby">Baby boy<br>
<input type="radio" name="age" value="small">Small boy<br>
<input type="radio" name="age" value="big">Big boy<br>
<input type="radio" name="age" value="man">Man<br>
<input type="radio" name="age" value="giant">Giant man<br>
<input type="radio" name="age" value="small">Others<br>
</form>

here is the output:

Baby boy
Small boy
Big boy
Man
Giant man
Others

dropdowns(combo-boxes)

<form>
<input type="checkbox" name="gender"/>Male <br>
<input type="checkbox" name="gender"/>FeMale <br>
</form>

here is an output:

Male
FeMale
combo-box
<form> <select>> <option value="1">One</option> <br>
<option value="2">Two</option><br>
<option value="3">Three</option><br>
<option value="4">Four</option><br>
<option value="5">Five</option><br>
</select> </form><br>

here is output:


combo-box with multiple selection enable
<form> <select multiple> <br>
<option value="1">One</option><br>
<option value="2">Two</option><br>
<option value="3">Three</option><br>
<option value="4">Four</option><br>
<option value="5">Five</option> </select><br>
</form>

here is output:


text area, password,submit, file upload, and reset button

<form>
<input type="text" value="12345" size="5" maxlength="3"><br>
<input type="text"><br>
<input type="file" name="fileupload" accept="image/*" />
Password : <input type="password"><br&g
t <textarea cols="5" rows="5"></textarea><br>
<input type="button" value="submit"><br>
<input type="reset" name="reset" value="Reset">
</form>

here is output:



Password :


Thanks For You Reading The Post We are very happy for you to come to our site. Our Website Domain name http://hausanovelspdf.blogspot.com/.
Newer Posts Newer Posts Older Posts Older Posts

More posts

Comments

Post a Comment