Question : html, select a default option in the <select>

html, how do is select 2 as the default?

<select name="date_column">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>

Answer : html, select a default option in the <select>

I believe that is supposed to be 'selected' but 'default' may work.

<select>
  <option>Volvo</option>
  <option selected="selected">Saab</option>
  <option>Mercedes</option>
  <option>Audi</option>
</select>

for simple syntax, I highly suggest using www.w3schools.com . They have a great way of giving great syntax, and simple examples for things like that. I use them all the time.
Option selected:
http://www.w3schools.com/TAGS/att_option_selected.asp

Option Tag:
http://www.w3schools.com/TAGS/tag_option.asp

Main Site:
http://www.w3schools.com
Random Solutions  
 
programming4us programming4us