Home > DeveloperSection > Beginner > Menu command in HTML5

Menu command in HTML5


HTML5 HTML5 
Ratings:
0 Comment(s)
 4194  View(s)
Rate this:

Menu command in HTML5

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>

        &nbsp;&nbsp;

        <command onclick="alert('Second Menu Command button is clicked.')">

            <button>Second Menu Command</button>

        </command>

        &nbsp;&nbsp;

        <command onclick="alert('Third Menu Command button is clicked.')">

            <button>Third Menu Command</button>

        </command>

    </menu>

</body>

Output of following code snippet is as follows

Menu command in HTML5Menu command in HTML5


Don't want to miss updates? Please click the below button!

Follow MindStick