Tutorials References Exercises Sign Up Menu
Create Website Get Certified Pro

HTML <menuitem> icon Attribute

❮ HTML <menuitem> tag


Specify icons for different <menuitem> elements:

<menu type="context" id="mymenu">
  <menuitem label="Refresh" icon="ico_reload.png"></menuitem>
  <menuitem label="Twitter" icon="ico_twitter.png"></menuitem>
  <menuitem label="Facebook" icon="ico_facebook.png"></menuitem>
Try it Yourself »

Definition and Usage

The icon attribute specifies an image that represents the command/menu item.

Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

icon Not supported Not supported 8.0 Not supported Not supported


<menuitem icon="URL">

Attribute Values

Value Description
URL Specifies an icon for the menu item.

Possible values:

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

❮ HTML <menuitem> tag