What is input type attribute in html with example?
Input is such a tag which is mostly used in creation of application form in HTML.
Basically, input tag in html is an attribute or character in which we code something in back end. And in front end we have to give response such as an application or registration form see below:👇
as in image ,we have to put username ,password, email and other requirement fill. Basically, here we input our username , password e.t.c. That's way we call them input tag.
- There are many attribute of HTML and each has many values in html .
lets see some example of input tag attributes.
- name
- multiple
- checked
- disabled
- placeholder
- form
- read only
- formaction
- Required
- form method
- size
- List
- Src
- Step
- Maxlength
- Value
- Width
lets see some example value of type attribute.
- text
- radio
- number
- password
- checkbox
- reset
- submit
- data-time local
- data
- time
- hidden
- tel
- month
- week
- image
- search
- range
- hidden color
- file
- url
In input tag we learn about first input type attribute or character . Because it is very useful and it has many values as we see above .
Try to understand :
NAME:<input type="text" name="username">
In this input type we put the text and why we write name? We write name to tell the server that here we want to write username. It necessary to tell the server what we want.
let see practice of input type attribute with its each value to make form.
<html>
<head>
<title>input tag attribute in form with example.</form>
<body>
<form>
NAME: <input type="text" name="username"><br>
EMAIL: <input type="text" name="email adress"><br>
PASSWORD: <input type="password" name="password"><br>
DATE OF BIRTH: <input type="date" name="user DOB"><br>
MOBILE: <input type="tel" name="user phone no."><br> tel mean telephone
GENDER:<BR>
Male: <input type="radio" name="gender"><br>
Female: <input type="radio" name="gender"><br>
Other: <input type="radio" name="gender"><br>
LANGUAGE:<br>
English: <input type="checkbox" name="language"><br>
URDU: <input type="checkbox" name="language"><br>
HINDI: <input type="checkbox" name="language"><br>
ARABIC: <input type="checkbox" name="language"><br>
OTHER: <input type="checkbox" name="language"> <br> .
TIME: <input type="time" name="time"><br>
DATE AND TIME= <input type="datetime-local" name="DOB"><br>
BIRTH MONTH= <input type="month" name="DOB MONTH"><br>
WEEK= <input type=week" name="week"><br>
UPLOAD PHOTO: <input type="file" name="profile photo"><br>
PERSON: <input type="number" name="person count"><br>
RANGE: <input type="RANGE" name="range"><br>
</form>
</body>
<html>