Today I Learned - Rocky Kev

TIL that there was a menu element in prior HTML versions

POSTED ON:

TAGS:

HTML4, <menu> was depreciated. Because <ul> and <li> could do the same.

HTML5, it was kinda brought back. Only by Firefox. And the other browsers were like, "Why?"

You can still do this. This is still legal. And it will kinda display properly.

But it won't have all the sweet accessibility benefits that <ul> and <li> has.

<menu>
<li><a href=...>Some text</a></li>
<li><button type=button>Some action!</button></li>
<!-- ... -->
</menu>

REF:
Semantic

context


Related TILs

Tagged: