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

HTML command icon attribute

HTML icon attribute

HTML command Tag Reference HTML tag

Example

Representing an image for the element:

onclick="setAlign('left')">Left

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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


Definition and Usage

The icon attribute specifies the image that represents the command element.


Differences between HTML 4.01 and HTML5

The tag is new in HTML5.


Syntax

Attribute values

Value Description
URL Specifies the image that represents the command.

Possible values:

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

    HTML command Tag Reference HTML tag