[whatwg] Arbitrary HTML in option-elements

Ian Hickson ian at hixie.ch
Wed Dec 8 20:41:40 PST 2004


On Tue, 30 Nov 2004, [ISO-8859-1] Olav Junker Kjær wrote:
>
> It would be a useful feature if arbitrary HTML was allowed in option 
> elements. E.g. items in a dropdown could have different icons.
> 
> However, I think it's a bad idea to declare rendering undefined in this 
> case. (section 2.18) Since arbitrary HTML in option-elements is a 
> genuinely useful feature, some authors are probably going to take 
> advantage of it, if it is available in some implementations. This will 
> lead to incompatibilities.

It already is possible in some, and it isn't being taken advantage of, so 
I think we're actually relatively safe on this particular front. In 
general I would agree with you, but in this particular instance it seems 
authors don't find this useful enough to take advantage of.

I don't want to say UAs have to ignore such markup, it could be quite 
useful in certain cases (e.g. bidi markup). Equally we can't say it must 
be supported, since some UAs have to use OS widgets and those might not 
support arbitrary markup.


> Along the same lines, I think its a bit misleading to warn against 
> putting form-elements into select-elements because of usability-issues 
> (also section 2.18). The warning implies that you *can* put forms into 
> options, but usually shouldn't, while its actually forbidden by the DTD 
> in section A.

It might be forbidden, but you can still do it. (Just like theft is 
forbidden, but still possible.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


More information about the whatwg mailing list