setting an HTML option value to the empty string
html
Solution
It is just Google Chrome's DOM inspector's notation (removes '=""' from attributes). If you inspect it with FireBug or simply view the source then you will see it is OK.
Your sample code produces this in Google Chrome:
And this is the result in FireFox:
So don't worry about that.
Problem
I have the following HTML code used to create on a page: ``` <select> <option value="" selected>test</option> <option value="test2">test2</option> </select> ``` But when looking at the HTML in Google Chrome's DOM inspector it looks like this: ``` <select> <option value selected>test</option> <option value="test2">test2</option> </select> ``` See the difference? For the first `<option>...</option>`, `value=""` is turned into just `value`. The value, when set to the empty string is simply discarded. Is there any way to set the value of an option tag to the empty string? I need this because I'm pulling elements out of a database to create a `<select>` menu. Each `<option>` will have it's `value` set to value of a database element and some of those elements have the empty string as their value.