Reputation: 18869
Is it valid to add a div within select tags?
Using Marionette, I have a compositeview that uses "select" as an itemViewContainer.
The options are dynamically loaded from the server.
In case no options are available, I want to load an emptyview instead using div (no option).
Is it valid to load a div as emptyview within the select?
Upvotes: 0
Views: 76
Reputation: 253318
No; the only valid child elements of a <select>
element are <option>
or <optgroup>
elements; <div>
elements are not permitted; not even if you try to wrap them inside of an <option>
(which can contain only text).
References:
Upvotes: 5