Lecture 3 - Forms
Lecture 3 - Forms
Form Attributes
</form>
Example:
<form>
First name: <input type = "text" name = "first_name" />
</form>
Output :
Example:
<form>
<input type = "text" name = "user_id" />
</form>
Output :
Output :
Example:
<form>
<input type = "checkbox" name = "maths" value = "on"> Maths
<input type = "checkbox" name = "physics" value = "on"> Physics
</form>
Output :
Example:
<form>
<input type = "radio" name = "subject" value = "maths"> Maths
<input type = "radio" name = "subject" value = "physics"> Physics
</form>
Output :
Example: <form>
<select name = "dropdown">
<option value = "Maths" selected>Maths</option>
<option value = "Physics">Physics</option>
</select>
</form>
Output :
Example: <form>
<input type = "file" name = "fileupload" accept = "image/*" />
</form>
Output :
Example: <form>
<input type = "submit" name = "submit" value = "Submit" />
<input type = "reset" name = "reset" value = "Reset" />
<input type = "button" name = "ok" value = "OK" />
<input type = "image" name = "imagebutton" src = "/html/images/logo.png"
</form>
Output :
i. <input type="date">
ii. <input type="email">
iii. <input type="month">
iv. <input type="password">
v. <input type="search">
vi. <datalist>
vii. <fieldset>
viii. <label>