The On-Again, Off-Again Life of the HTML <menu> Element

Scott O'Hara has traced the checkered history of the <menu> element, finding references as far back as a 1994 changelog for HTML 2. Back then, the intent seemed to be marking up a list—perhaps with a purpose similar to today's <nav>, though that's speculative.

The element's fate has been anything but stable. HTML 4 deprecated it, HTML 5 brought it back as a "group of commands," and then HTML 5.2 deprecated it once more. That's a rough ride for a tag with some clear potential use cases.

For now, the recommendation is to leave <menu> alone. As O'Hara notes, the "use semantic HTML and you get accessibility for free" mantra mostly holds—but <menu> is an exception. Its defined semantics don't line up with real-world needs, and a plain <ul> or a custom role=toolbar or menubar serves better. Using the element for semantics' sake alone doesn't deliver much practical value.

"It's intended semantics and what we actually need in reality are better served by either just using the more robust <ul> element, or creating your own role=toolbar, menubar, etc.. Using this semantic element, for semantics sake, is just that."