Input Types in HTML

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:

text input type


Password

Text hide ho jata hai (dots ya stars me show hota hai). Use: Login forms

Example:

Password input type


Submit

Form submit karta hai. Agar value nahi diya to default text aayega.

Example:

Submit input type


Reset

Form ke values default pe wapas le aata hai.

Example:

Reset form attribute


Button

Simple button (kuch action ke liye JS ke sath).

Example:

button input type


Selection Inputs

Radio

Sirf ek option select kar sakte ho. Same name hona zaroori hai.

Example:

Input Types in HTML


Checkbox

Multiple select kar sakte ho.

Example:

Checkbox


Modern / Special Input Types

Color

Color picker khulta hai 

Example:

Color


Date

Date picker show hota hai

Example:

Date


Datetime-local

Date + time (no timezone)

Example:

Datetime-local


Email

Email validation automatic hoti hai.

Example:

Email


File

File upload ke liye.

Example:

File


Hidden

User ko nahi dikhega.

Example:

Hidden


Number

Sirf numbers allow karta hai.

Example:

Number


Range

Slider control 

Example:

Range


Search

Search box jaisa behave karta hai.

Example:

Search


Tel

Phone number input. Pattern laga sakte ho:

Example:

Tel


Time

Time picker

Example:

Time


URL

Website link ke liye.

Example:

URL


Week

Week + year select karta hai.

Example:

Week

Leave a Comment