I have some markup similar to the following:
<select>
<option selected="selected">Apple</option>
<option selected="">Orange</option>
</select>
In this case, "Orange" shows as the selected item. I would have expected making the selected
attribute blank would undo its effects. Is there a way to write this without simply leaving the attribute out?
<option selected='selected' />
" On the contrary, w3.org/TR/html4/interact/forms.html#adef-selected declaresselected
to be a boolean attribute, and w3.org/TR/html4/intro/sgmltut.html#h-3.3.4.2 explains that it is the mere appearance of boolean attributes that implies a value of "true" or "false".<OPTION selected>
is actually used as an example! – Fledgy