X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <menuitem> icon Attribute

HTML menuitem Tag Reference HTML <menuitem> tag

Example

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>
</menu>

Try it Yourself »

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The icon attribute is currently supported only in Firefox.


Definition and Usage

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


Differences Between HTML 4.01 and HTML5

The <menuitem> tag is new in HTML5.


Syntax

<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 Reference HTML <menuitem> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook