Drop down list - multiple selections

Can one create a drop-down list in an HTML form which has
multiple things selected by default?  I can create a list where you can select multiple things, and can have one thing highlighted (already selected), but can't figure out how to have more than one thing highlighted automatically.
jdauesAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
BrigidConnect With a Mentor Commented:
Sure, just make your drop-down a multiple select box, then put SELECTED before the close of the first option tag for each one you want selected, like so:

<form action="action.htm">
<select name="Test" size="4" multiple>
<option value="1" SELECTED>Choice 1</option>
<option value="2">Choice 2</option>
<option value="3" SELECTED>Choice 3</option>
<option value="4">Choice 4</option>
</select>
<input type="Submit" value="Submit"><input type="Reset">
</form>

This will preselect options one and three.
0
All Courses

From novice to tech pro — start learning today.