HTML4 HTML5
Used to create interactive controls in forms to accept user input. Appearance and functionality depend on the type attribute.
Void element with no closing tag.
Attributes:
type – Specifies input type (e.g., text, password, checkbox, radio, submit, email, number, date).name – Field name submitted with form data.value – Default or defined field value.placeholder – Short hint shown in empty text fields.required – Mandates field completion before submission.disabled – Disables interaction with the field.readonly – Prevents editing content in the field.Code:
The browser will interpret this code as follows: