HTML <command> iconAttribute

HTML command 标签参考手册HTML <command> Tag

Examples

The image that represents the <command> element:

<menu>
<command type="radio" label="Left" icon="left.png"
onclick="setAlign('left')">Left</command>
</menu>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Currently, almost all mainstream browsers do not support the icon attribute.


Definition and Usage

The icon attribute specifies an image that represents a command element.


Differences between HTML 4.01 and HTML5

The <command> tag is new in HTML5.


Syntax

<command icon="URL">

Attribute Values

Value Description
URL Specifies the image representing the command.

Possible values:

  • Absolute URL - points to another website (e.g. icon="http://www.example.com/lamp.jpg")
  • Relative URL - points to a file within a website (e.g. icon="lamp.jpg")


HTML command 标签参考手册HTML <command> Tag Other Extensions