Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML tag

HTML tag

Example

It can be marked as follows:

Save

Try it »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Currently, no mainstream browser supports tag.

**Note:** Only IE 9 supports the tag; earlier or later versions of IE browsers do not support tag.


Tag Definition and Usage Notes

The tag can define a command that a user can invoke (such as a radio button, checkbox, or button).

When using

element, the command element is displayed as part of a menu or toolbar. However, when a keyboard shortcut is specified with a command, the command element can be placed anywhere on the page, but the element is not visible.


Differences between HTML 4.01 and HTML5

The tag is new in HTML 5.


property

New : New attributes in HTML5.

property Value Description
checkedNew checked Specifies whether the command is checked when the page loads. Only used with the radio or checkbox type.
disabledNew disabled Specifies whether the command is enabled.
iconNew URL Specifies the URL of the image to display as the command.
labelNew text Required. Specifies the name of the command, visible to the user.
radiogroupNew groupname Specifies the name of the group to which a toggleable command that can be toggled belongs. Only used when the type is radio.
typeNew checkbox
 command       

 radio | 定义 command 的类型。默认是 "command"。 |

Global Attributes

The tag supports HTML Global Attributes.


Event attribute

The tag supports HTML Event Attributes.