1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > HTML Input Types Demo</ title >
7+ < style >
8+ body { font-family : Arial, sans-serif; padding : 20px ; }
9+ label { display : block; margin-top : 10px ; font-weight : bold; }
10+ input { margin : 5px 0 ; padding : 5px ; width : 250px ; }
11+ </ style >
12+ </ head >
13+ < body >
14+ < h1 > HTML Input Types Demo</ h1 >
15+ < form >
16+ <!-- Textual Inputs -->
17+ < label for ="text "> Text:</ label >
18+ < input type ="text " id ="text " placeholder ="Enter text ">
19+
20+ < label for ="password "> Password:</ label >
21+ < input type ="password " id ="password " placeholder ="Enter password ">
22+
23+ < label for ="email "> Email:</ label >
24+ < input type ="
email "
id ="
email "
placeholder ="
[email protected] "
> 25+
26+ < label for ="url "> URL:</ label >
27+ < input type ="url " id ="url " placeholder ="https://example.com ">
28+
29+ < label for ="tel "> Telephone:</ label >
30+ < input type ="tel " id ="tel " placeholder ="123-456-7890 ">
31+
32+ < label for ="search "> Search:</ label >
33+ < input type ="search " id ="search " placeholder ="Search... ">
34+
35+ < label for ="number "> Number:</ label >
36+ < input type ="number " id ="number " min ="0 " max ="100 " step ="1 ">
37+
38+ < label for ="range "> Range:</ label >
39+ < input type ="range " id ="range " min ="0 " max ="100 ">
40+
41+ < label for ="color "> Color:</ label >
42+ < input type ="color " id ="color ">
43+
44+ <!-- Date and Time Inputs -->
45+ < label for ="date "> Date:</ label >
46+ < input type ="date " id ="date ">
47+
48+ < label for ="time "> Time:</ label >
49+ < input type ="time " id ="time ">
50+
51+ < label for ="datetime-local "> Datetime-local:</ label >
52+ < input type ="datetime-local " id ="datetime-local ">
53+
54+ < label for ="month "> Month:</ label >
55+ < input type ="month " id ="month ">
56+
57+ < label for ="week "> Week:</ label >
58+ < input type ="week " id ="week ">
59+
60+ <!-- Choice Inputs -->
61+ < label for ="checkbox "> Checkbox:</ label >
62+ < input type ="checkbox " id ="checkbox "> Check me
63+
64+ < label > Radio buttons:</ label >
65+ < input type ="radio " name ="radioGroup " value ="1 "> Option 1
66+ < input type ="radio " name ="radioGroup " value ="2 "> Option 2
67+
68+ < label for ="file "> File upload:</ label >
69+ < input type ="file " id ="file ">
70+
71+ <!-- Buttons -->
72+ < input type ="submit " value ="Submit ">
73+ < input type ="reset " value ="Reset ">
74+ < input type ="button " value ="Just a button ">
75+ < input type ="image " src ="https://via.placeholder.com/50 " alt ="Submit Image ">
76+
77+ <!-- Hidden Input -->
78+ < input type ="hidden " name ="hiddenField " value ="Hidden Value ">
79+ </ form >
80+ </ body >
81+ </ html >
0 commit comments