HTML Concepts: Commands and Facets
Post from March 29, 2022, filed under Web Development.
In the HTML concepts series I’m presenting lesser known ideas from the huge HTML specification. In this episode, let’s have a quick look at commands and facets.
Commands
Commands should be what you think they are. A command is defined as “the abstraction behind menu items, buttons, and links.” It’s what you issue when you interact with them, that is, click or press on either.
Accordingly,
- an
a
element with anhref
attribute defines a command; as does - a
button
element (“always”); - an
input
element whosetype
attribute is in a “Submit Button, Reset Button, Image Button, Button, Radio Button, or Checkbox” state; - an
option
element with an ancestorselect
element and either novalue
attribute, or one that is not the empty string; - a
legend
element that has an assigned access key, is a child of afieldset
element, and whose parent has a descendant that defines a command that is neither alabel
nor alegend
element; and - any element that has an assigned access key.
Facets
Facets are rarely mentioned anywhere; they are something a command has. There are the following facets:
- Label: the name of the command.
- Access key (optional): a key combination selected by the user agent which triggers the command.
- Hidden state (optional): information on whether the respective command is hidden.
- Disabled state (optional): information on whether the respective command is relevant and can be triggered.
- Action: the effect of the command when triggered, like a URL to navigate to, a form submission, or an event handler.
âť§ Commands are easy to work with, as they represent something actionable. Facets may be what you can now recall as something that specifies and gives information about a command. Review other concepts, and see you in a follow-up post of this series.
About Me

I’m Jens Oliver Meiert, and I’m an engineering manager and author. I’ve worked as a technical lead for Google, I’m close to the W3C and the WHATWG, and I write and review books for O’Reilly. Other than that, I love trying things, sometimes including philosophy, art, and adventure. Here on meiert.com I share some of my views and experiences.
If you have questions or suggestions about what I write, please leave a comment (if available) or a message.
Read More
Have a look at the most popular posts, possibly including:
Looking for a way to comment? Comments have been disabled, unfortunately.

Perhaps my most comprehensive book: The Web Development Glossary (2020). With explanations and definitions for literally thousands of terms from Web Development and related fields, building on Wikipedia as well as the MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.