HTML Input Types
Input types define what kind of data users can enter in a form field. They improve user experience by ensuring correct data entry.
What are Input Types
Input fields are created using the <input> tag. By specifying the
type attribute, you can trigger different behaviors and layouts (like email keyboards
or password masks).
Common Input Types
Text Input
Used for normal text, such as a name or search query.
<input type="text" name="name">
Example use: Applicant entering their name for a CODE4UTECH internship.
Email Input
Ensures users enter a valid email format. Browsers automatically check if the format is correct before submission.
<input type="email" name="email">
Password Input
Used for login forms. Characters are hidden while typing to maintain security.
<input type="password" name="password">
Number Input
Used for numeric values. You can also specify min and max values.
<input type="number" name="experience">
Example use: entering years of work experience.
File Upload
Allows users to upload files from their device.
<input type="file" name="resume">
Example use: allowing internship applicants to upload their resumes.
Submit Button
Used to submit form data to a server.
<input type="submit" value="Submit Application">