[whatwg] datalist element example and option element content model

Kurosawa Takeshi taken.spc at gmail.com
Wed Jul 17 17:24:29 PDT 2013


I noticed inconsistency between datalist element example and option
element content model.

In a datalist element's code example, there are option elements which
don't specify label attribute and are empty.

> <label>
>  Sex:
>  <input name=sex list=sexes>
>  <datalist id=sexes>
>   <option value="Female">
>   <option value="Male">
>  </datalist>
> </label>>

However option element section prohibits such condition.

> The label content attribute, if specified, must not be empty. If the attribute is not specified, then the element itself must not be empty.

My question is which one is correct: the code example or the option
element section.

Takeshi Kurosawa <taken.spc at gmail.com>

More information about the whatwg mailing list