-
Notifications
You must be signed in to change notification settings - Fork 0
/
chapter07_form_drop_down_menu.html
29 lines (29 loc) · 1.48 KB
/
chapter07_form_drop_down_menu.html
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
<html>
<head>
<title>Form Drop Down Menu</title>
</head>
<body>
<h1>Form Drop Down Menu</h1>
<p>In order to create a form that allows you to display a drop down menu, the <b><select></b> element needs to be used.</p>
<p>The <b><select></b> element requires a <b>name</b> attribute and for each option in the drop down menu, the <b><option></b> tag meeds to be used. In order words, the <b><option></b> elements need to be nested within the <b><select></b> element.</p>
<p>The <b><option></b> element should have a <b>value</b> attribute set to the value that will be sent to the server, if selected. Like with the radio buttons or check boxes, if you want any selection in the drop down menu to be auto selected when the page load, then the <b>selected</b> attribute can be used by setting it to "selected"</p>
<p></p>
<p>What month of the year where you born on?
<select name="month">
<option value="notselected">Select Month</option>
<option value="Jan">January</option>
<option value="Feb">February</option>
<option value="Mar">March</option>
<option value="Apr">April</option>
<option value="May">May</option>
<option value="Jun">June</option>
<option value="Jul">July</option>
<option value="Aug">August</option>
<option value="Sep">September</option>
<option value="Oct">October</option>
<option value="Nov">Novemeber</option>
<option value="Dec">December</option>
</select>
</p>
</body>
</html>