IE7 Bug: <option> element has empty initial value

Author: Jared Beck
Date: 3/27/2009

Regarding the initial value of option elements, W3C HTML Spec Section 17.6 says:

"[The value] attribute specifies the initial value of the control. If this attribute is not set, the initial value is set to the contents of the OPTION element."

Example: <option>foobar</option> should have the initial value "foobar". IE7 fails to set the initial value correctly. IE returns the empty string.

Solution: Developers should explicitly set the value attribute for all option elements.