HTML form allows user to enter data that is sent to a server for processing. User fill out forms using text-boxes,checkboxes, and radio buttons. Starting tag for form is <form>. Closing tag for form is </form>.
<form>
<label>Username :</label><input type="text" name="username" >
<label>Password : </label><input type="password" name="password">
<input type="submit" Value="Login">
</from>
A simple text box that allows input of a single line of text.
<label>Name :</label><input type="text" name="username" >
Text in which the characters typed in are invisible or replaced by symbols such as !. It is used for security purposes.
<label>Password : </label><input type="text" name="password" >
A type of text that requires a partially validated email address. Data entered without @ sign not accepted.
<label>Email: </label><input type="email" name="email" >
A type of text that requires a number. Character data not accepted.
<label>Number: </label><input type="number" name="number" >
Checkboxes allow you to select one or more option from a pre-defined set of options.
<form> <input type="checkbox" name="medicine"><label> Panadol </label>
<input type="checkbox" name="medicine"><label> Paracetamol</label>
<input type="checkbox" name="medicine"><label> Calpol </label>
</form>
Radio element allow you to select one option from a pre-defined set of options.
<form> <input type="radio" name="medicine"> <label>Panadol</label>
<input type="radio" name="medicine"><label> Paracetamol</label>
</form>
File element control for uploading a file.
<form> <label>Upload File</label> <input type="file" name="medicine">
</form>
Reset element tells the browser to restore the values to their initial values.
<form><label>Username :</label><input type="text" name="username" >
<label>Password : </label><input type="password" name="password">
<input type="reset" Value="Reset">
</from>
Submit Element is a button that tells the browser to take action on the form (typically to send it to a server)
<form>
<label>Username :</label><input type="text" name="username" >
<label>Password : </label><input type="password" name="password">
<input type="submit" Value="Login">
</from>
Defines button.
<form>
<label>Username :</label><input type="text" name="username" >
<label>Password : </label><input type="password" name="password">
<input type="button" onclick="alert('You Login')" value="login">
</from>
Defines color to pick.
<form>
<label>Please select color:</label><input type="color" name="selectcolor" >
</from>
Defines time as input field.
<form>
<label>Please enter event date and time</label> <input type="datetime-local" name="eventtime">
<input type="submit">
</from>
Defines Date as input field.
<form>
<label>Please enter event date</label> <input type="date" name="eventdate">
<input type="submit">
</from>