Dalton Pereira Dalton Pereira - 8 months ago 48
HTML Question

placeholder for select tag

Is it possible to have a placeholder on a select tag?

<select placeholder="select your beverage">





or may be a possible work around?


EDIT: This did/does work at the time I wrote it, but as Blexen pointed out, it's not in the spec.

Add an option like so:

<option default>Select Your Beverage</option>

The correct way:

<option selected="selected">Select Your Beverage</option>