THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <command> icon Attribute

❮ HTML <command> tag

Example

An 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

Attribute
icon Not supported Not supported Not supported Not supported Not supported

Definition and Usage

The icon attribute specifies an image that represents the command.


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 picture that represents the command.

Possible values:

  • An absolute URL - points to another web site (like icon="http://www.example.com/lamp.jpg")
  • A relative URL - points to a file within the web site (like icon="lamp.jpg")

❮ HTML <command> tag