Html5 Command icon Attribute Tag

The command icon attribute tag is use to indicate the URL of the image.The command icon attribute tag was introduced in HTML 5. The command icon attribute tag did not exist in older versions of HTML.In icon attribute value is url.

Syntax:

<command icon="value">

Example Code

<!DOCTYPE HTML>
<menu>
  <command onclick="alert('This is command icon attribute button!')" icon="../../images/flower-icon.jpg"> Click This! </command>
</menu>

Out Put :



Click This!

In the above example icon="../../images/flower-icon.jpg" is a command type attribute.





Content