[whatwg] The IMG element, proposing a CAPTION attribute

Lachlan Hunt lachlan.hunt at lachy.id.au
Mon Nov 20 21:39:52 PST 2006

Andrew Fedoniouk wrote:
> E.g. the engine allows to define following:
> <select id="color-selector">
>   <popup>
>      <table>
>         <tr>
>             <td role="option" value="#00FF00">...
>             <td role="option" value="#0000FF">...
>         </tr>
>      </table>
>  </popup>
> </select>
> to be able to define something like this:
> http://www.terrainformatica.com/sciter/screenshots/color-chooser.png
> http://www.terrainformatica.com/htmlayout/images/selects3.jpg

A better way to implement that without embedding presentational markup 
in the HTML would be to use an XBL template, bound to  an ordinary 
select element.  You could write all the markup you need to render the 
colour chooser or periodic table in the XBL <template>, which is 
populated by the values from the <option> elements.  That has the 
advantage of providing better fallback in legacy UAs.

Lachlan Hunt

More information about the whatwg mailing list