Setting value of Select in html
<p>I am generating this html from python and 2% is the value of the field so it is what should be shown but I am baffled as to why it doesn't work as I expect. I have tried so many permutations and figure it is something so simple.   Please Help.  I don't necessarily want to use the selected option in the <code>&lt;option&gt;</code> tag.</p>

<pre><code>    &lt;select name="discount" value="2%"&gt;
       &lt;option&gt;10%&lt;/option&gt;
       &lt;option&gt;9%&lt;/option&gt;
       &lt;option&gt;8%&lt;/option&gt;
       &lt;option&gt;7%&lt;/option&gt;
       &lt;option&gt;6%&lt;/option&gt;
       &lt;option&gt;5%&lt;/option&gt;
       &lt;option&gt;4%&lt;/option&gt;
       &lt;option&gt;3%&lt;/option&gt;
       &lt;option&gt;2%&lt;/option&gt;
       &lt;option&gt;1%&lt;/option&gt;
       &lt;option"&gt;0%&lt;/option&gt;
    &lt;/select&gt;
</code></pre>

<p>If you want to selected 2% value then your dropdown should be like this : </p>

<pre><code>&lt;select name="discount"&gt;
       &lt;option value="10%"&gt;10%&lt;/option&gt;
       &lt;option value="9%"&gt;9%&lt;/option&gt;
       &lt;option value="8%"&gt;8%&lt;/option&gt;
       &lt;option value="7%"&gt;7%&lt;/option&gt;
       &lt;option value="6%"&gt;6%&lt;/option&gt;
       &lt;option value="5%"&gt;5%&lt;/option&gt;
       &lt;option value="4%"&gt;4%&lt;/option&gt;
       &lt;option value="3%"&gt;3%&lt;/option&gt;
       &lt;option selected value="2%"&gt;2%&lt;/option&gt;
       &lt;option value="1%"&gt;1%&lt;/option&gt;
       &lt;option value="0%"&gt;0%&lt;/option&gt;
    &lt;/select&gt;
</code></pre>

<p>try with it.</p>

python html