[whatwg] Menu example

On Wed, 25 Apr 2007, Elliotte Harold wrote:
>
> I'm trying to figure out what an HTML 5 menu might actually look like in 
> code. Is something like this reasonable:
> 
> <menu id="ed_toolbar">
>     <li><input onclick="edInsertTag(edCanvas, 0);" value="strong"></li>
>     <li><input onclick="edInsertTag(edCanvas, 1);" value="em"></li>
>     <li><input onclick="edInsertLink(edCanvas, 2);" value="link" ></li>
>     <li><input onclick="edInsertTag(edCanvas, 3);" value="b-quote"></li>
>     <li><input onclick="edInsertTag(edCanvas, 4);" value="del" ></li>
>     <li><input onclick="edInsertTag(edCanvas, 5);" value="ins" ></li>
>     <li><input onclick="edInsertImage(edCanvas);" value="img" ></li>
>     <li><input onclick="edInsertTag(edCanvas, 7);" value="ul" ></li>
>     <li><input onclick="edInsertTag(edCanvas, 8);" value="ol" ></li>
>     <li><input onclick="edInsertTag(edCanvas, 9);" value="li" ></li>
>     <li><input onclick="edInsertTag(edCanvas, 10);" value="code" ></li>
>     <li><input onclick="edInsertTag(edCanvas, 11);" value="cite"></li>
>     <li><input onclick="edInsertTag(edCanvas, 12);" value="abbr" ></li>
>     <li><input onclick="edInsertTag(edCanvas, e13);" value="acronym" ></li>
> </menu>

You'd need type=button on those <input>s, and type=toolbar on the <menu>, 
but otherwise that seems about right. Yes, it'd be one way to do it. You 
don't have to use <input>s, or <li>s, though.

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

Received on Wednesday, 25 April 2007 10:58:02 UTC