Default input types in HTML = “text”. Agar type nahi likha to automatically text hi hoga.
Basic Input Types:
Aab ham basic input types in HTML discuss karenge
Text
Single line input box. Use: Name, city, etc.
Example:
![]()
Password
Text hide ho jata hai (dots ya stars me show hota hai). Use: Login forms
Example:
![]()
Submit
Form submit karta hai. Agar value nahi diya to default text aayega.
Example:
![]()
Reset
Form ke values default pe wapas le aata hai.
Example:
![]()
Button
Simple button (kuch action ke liye JS ke sath).
Example:
![]()
Selection Inputs
Radio
Sirf ek option select kar sakte ho. Same name hona zaroori hai.
Example:
![]()
Checkbox
Multiple select kar sakte ho.
Example:
![]()
Modern / Special Input Types
Color
Color picker khulta hai
Example:
![]()
Date
Date picker show hota hai
Example:
![]()
Datetime-local
Date + time (no timezone)
Example:
![]()
Email validation automatic hoti hai.
Example:
![]()
File
File upload ke liye.
Example:
![]()
Hidden
User ko nahi dikhega.
Example:
![]()
Number
Sirf numbers allow karta hai.
Example:
![]()
Range
Slider control
Example:
![]()
Search
Search box jaisa behave karta hai.
Example:
![]()
Tel
Phone number input. Pattern laga sakte ho:
Example:
![]()
Time
Time picker
Example:
![]()
URL
Website link ke liye.
Example:
![]()
Week
Week + year select karta hai.
Example:
![]()