Jichao Jichao - 8 months ago 20
HTML Question

How can I set the default value for an HTML <select> element?

I thought that adding a

attribute set on the
element below would cause the
containing my provided
to be selected by default:

<select name="hall" id="hall" value="3">

However, this did not work as I had expected. How can I set which
element is selected by default?


Set selected="selected" for the option you want to be the default.

<option selected="selected">