0

I'm trying to get a handle on the new HTML5 elements and start using them correctly. I am thoroughly confused as to the status of the <command> element.

According to the W3C website Editor's Draft:

A command is the abstraction behind menu items, buttons, and links. http://www.w3.org/html/wg/drafts/html/master/semantics.html#commands

And the W3C Working Group Note:

The command element is a multipurpose element for representing commands. http://www.w3.org/TR/html-markup/command.html#command

But, according to MDN:

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/command

More information is given here:

The <command> element has now been dropped from the HTML5 specification. Therefore, you should not use it in your HTML markup. I have decided to keep this page for information purposes only. http://www.quackit.com/html_5/tags/html_command_tag.cfm

And w3schools simply ignores it. http://www.w3schools.com/tags/default.asp

What exactly is the HTML5 <command> tag and what is the browser support has an answer that states the element is removed but the whatwg mailing list it cites don't seem to come to a normative conclusion, the element is still in the spec, and other notes in that letter seem to be out of date. The <menu> element seems to have overlap but there's no note in the spec about which to use in which case.

So, is the <command> element in or out?

Community
  • 1
  • 1
Josiah
  • 3,008
  • 1
  • 34
  • 45

1 Answers1

3

The <command> element is definitely out. You should always rely on the actual HTML Standard at https://html.spec.whatwg.org/multipage/ for up-to-date authoritative information on HTML.

All HTML spec versions (copies) other than https://html.spec.whatwg.org/multipage/ are not guaranteed to be up to date and are often months or even years out of date.

The mechanism that HTML currently specifies for handling commands is documented in the Commands section of the HTML Standard. Among other things, it provides a markup-based way to declare commands using attributes rather than a separate element.

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
  • Ah, ok. I was confused due to the similarity of the `` element and the `commands` section of the spec. Thanks for clearing this up! – Josiah Sep 21 '15 at 23:48
  • 1
    Cheers. And sorry for the profusion of out-of-date HTML spec copies in various places. That’s partly my fault. If I had it to do over again we’d not have multiple versions of HTML specs lying around the way we have now. – sideshowbarker Sep 21 '15 at 23:53
  • "All HTML spec versions (copies) other than https://html.spec.whatwg.org/multipage/ are not guaranteed to be up to date and are often months or even years out of date." Ah, if only it was that simple. That version of the spec is subject to the whim and intransigence of its editor, in a way that can be harmful to users, witness the `
    ` element. I prefer the W3C HTML5.1 spec. Generally, the W3C spec is better for web authors, the WHATWG spec better for browser developers.
    – Alohci Sep 22 '15 at 07:35