Professional Documents
Culture Documents
Front End Lecture 8
Front End Lecture 8
Front End Lecture 8
(Html)
LECTURE-8
Today’s Agenda
</textarea>
</form>
The <select> Tag
2. A Scrolling List
The <select> Tag
<select>
Syntax:
<select>
<optgroup label=“some name”>
<option> some text </option>
<option> some text </option>
<option> some text </option>
</optgroup>
.
.
</select>
Example 12
<select>
<optgroup label="Server Side Lang" >
<option>PHP</option>
<option>JSP</option>
<option>Python</option>
</optgroup>
<optgroup label="Client Side Lang" >
<option>Java Script</option>
<option>VB Script</option>
</optgroup>
</select>
Creating Scrollable Lists
<select multiple=“multiple”>
<option> some text </option>
<option> some text </option>
<option> some text </option>
.
.
</select>
Example 12
<b>Your language of choice:
</b>
<form >
<select multiple=“multiple">
<optgroup label="Server Side Lang" >
<option>PHP</option>
<option>JSP</option>
<option>Python</option>
</optgroup>
<optgroup label="Client Side Lang" >
<option>Java Script</option>
<option>VB Script</option>
</optgroup>
</select>
</form>
Using The “size” Attribute
Default value is 1.