-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHtml_Exercise.html
More file actions
214 lines (187 loc) · 5.17 KB
/
Copy pathHtml_Exercise.html
File metadata and controls
214 lines (187 loc) · 5.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<!-- HTML Exercise by Tanmay Sinha(tanmay@vinsol.com) -->
<!-- changes by siddharth -->
<!-- new branch -->
<html lang='en'>
<head>
<meta charset="UTF-8" />
<title>
HTML Form Exercise
</title>
<style>
#main_frame{background-color: #C0C0C0; margin: 0px auto 0px auto; width: 800px;}
.bgc{background-color: #FFF000}
</style>
</head>
<body >
<div id='main_frame'>
<h1 align='center'>
HTML Form Exercise
</h1>
<p>
<span style="color:red;">
<b> Please note:</b>
</span>
This example demonstrates how HTML forms can be used.Submit button should submit the button and reset
button should reset the form(revert changes in the form fields).The form layout should be the same as below.
</p>
<form name="contact_form" action="http:\\" method="POST">
<table cellpadding="5">
<b>
Contact Form
</b>
<tr>
<td> □ </td>
<td> □ </td>
</tr>
<tr>
<td>Your name*:</td>
<td><input type='text' name='name' required></td>
</tr>
<tr>
<td>E-mail*:</td>
<td><input type='email' class='bgc' name='email' required></td>
</tr>
<tr>
<td>Phone number:</td>
<td><input type='tel' class='bgc' name='Ph-no.'></td>
</tr>
<tr>
<td>Website*:</td>
<td><input type='url' name='url' value="http://" required></td>
</tr>
<tr>
<td>Comments*:</td>
<td><textarea cols="30" rows="7" name="comment" style="resize:none;"></textarea></td>
</tr>
<tr>
<td>
<b>
Text Field:
</b>
</td>
</tr>
<tr>
<td>Your name:</td>
<td><input type='text' class='bgc' name='name' ></td>
</tr>
<tr>
<td>
<b>
Password field
</b>
</td>
<tr>
<tr>
<td>Password:</td>
<td><input type='password' name='pswd'></td>
</tr>
<tr>
<td>
<b>
Radio buttons
</b>
</td>
</tr>
<tr>
<td>Do you like pizza?</td>
</tr>
<tr>
<td><input type='radio' name='choice' value='Yes' checked>Yes</td>
</tr>
<tr>
<td><input type='radio' name='choice' value='No'>No</td>
</tr>
<tr>
<td><input type='radio' name='choice' value='Maybe'>Maybe<td>
</tr>
<tr>
<td><input type='radio' name='choice' value='Nevertried'>Never tried</td>
</tr>
<tr>
<td>
<b>
Check Box
</b>
</td>
</tr>
<tr>
<td><input type='checkbox' name='check'>Check this box if you like our service</td>
</tr>
<tr>
<td>
<b>
Text area
</b>
</td>
</tr>
<tr>
<td>Anything you would like to say?</td>
</tr>
<tr>
<td><textarea cols='30' rows='5' name='review' style="resize:none;"> </textarea></td>
</tr>
<tr>
<td>
<b>
I Like
</b>
</td>
</tr>
<tr>
<td>
<section class="veg">
<select id="veg1" size="5" multiple>
<option>Mushroom</option>
<option>Green peppers</option>
<option>Onions</option>
<option>Tomatoes</option>
<option>Olives</option>
</select>
</section>
</td>
</tr>
<tr>
<td>
<b>
Menu
</b>
</td>
</tr>
<tr>
<td>Your favourite color:</td>
</tr>
<tr>
<td>
<select name="color">
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Blue">Blue</option>
</select>
</td>
</tr>
<tr>
<td>
<b>
Attach File
</b>
</td>
</tr>
<tr>
<td><input type='file' id='file'></td>
</tr>
<tr>
<td>
<b>
Buttons
</b>
</td>
</tr>
<tr>
<td><input type='submit' value='Submit'><input type='reset' value='Reset'></td>
</tr>
</table>
</form>
</div>
</body>
</html>