We will use menu command in HTML5 to create menu commands. We will use <menu> tag for grouping commands item. In command tag we will define command button like a radio button, a check box or a button. Command elements are visible only if it is inside menu element.
Following example will demonstrate use of menu tag
<body>
<menu>
<!--Creating first menu command. Here we use command tag and apply css using style property. -->
<command onclick="alert('First Menu Command button is clicked.')">
<button>First Menu Command</button>
</command>
<command onclick="alert('Second Menu Command button is clicked.')">
<button>Second Menu Command</button>
</command>
<command onclick="alert('Third Menu Command button is clicked.')">
<button>Third Menu Command</button>
</command>
</menu>
</body>
Leave Comment