YouTip LogoYouTip

Att Command Type

## HTML `type` Attribute The `` element was introduced in HTML5 to represent a command that a user can invoke, typically within a menu structure. The `type` attribute specifies the type of command to be displayed. > **Important Note on Deprecation:** The `` element and its `type` attribute have been deprecated and removed from the modern HTML living standard. They are no longer supported by any modern web browsers. This reference is maintained for historical context and legacy code analysis. --- ## Definition and Usage The `type` attribute defines the behavior and visual representation of the `` element. It determines whether the command acts as a standard button, a toggleable checkbox, or a single-selection radio button. --- ## Syntax ```html ``` ### Attribute Values | Value | Description | | :--- | :--- | | `command` | **Default**. Specifies a standard command with an associated action (acts like a button). | | `checkbox` | Specifies a command that can be toggled on or off (acts like a checkbox). | | `radio` | Specifies a command that can be toggled as part of a group of mutually exclusive options (acts like a radio button). | --- ## Code Examples ### Example 1: Standard Command Type A standard command with the default `type="command"` triggers an action when clicked. ```html Save ``` ### Example 2: Checkbox Command Type A command with `type="checkbox"` allows users to toggle an option on or off. ```html Auto-Save ``` ### Example 3: Radio Command Type A command with `type="radio"` allows selection of a single option from a group. To group radio commands together, they must share the same `radiogroup` attribute. ```html Left Center Right ``` --- ## Browser Compatibility and Modern Alternatives ### Browser Support Historically, browser support for the `` element and its `type` attribute was extremely limited: * **Internet Explorer:** Only supported in Internet Explorer 9 (and only the `type="command"` value was supported). It was not supported in earlier or later versions. * **Chrome, Firefox, Safari, Opera:** Never fully implemented or supported this element. ### Modern Alternatives Because the `` element is obsolete, you should use standard HTML5 elements to achieve the same functionality: * **For standard commands:** Use the `
← Att Dialog OpenAtt Command Radiogroup β†’