Html select option selected does not work

Viewed 62536

How to set default selected element in combobox? Neither of the following worked for me:

Version 3:

<select id="parent">
    <option value='null'>(Root)</option>
    <option selected='yes' value='/'>Main</option>
</select>

Version 2:

<select id="parent">
    <option value='null'>(Root)</option>
    <option selected='true' value='/'>Main</option>
</select>

Version 1:

<select id="parent">
    <option value='null'>(Root)</option>
    <option selected value='/'>Main</option>
</select>

In all cases first option is selected on page, not that one which is marked selected.

SOME OTHER DETAILS

(1)

Page source beginning follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        ...

(2)

Browser is Firefox 13.0.1

3 Answers
Related