---
title: "Menu command in HTML5"  
description: "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 butt"  
author: "Anonymous User"  
published: 2011-07-20  
updated: 2019-09-07  
canonical: https://www.mindstick.com/articles/574/menu-command-in-html5  
category: "html5"  
tags: ["html5"]  
reading_time: 1 minute  

---

# Menu command in HTML5

We will use menu [command](https://www.mindstick.com/blog/178/synchronous-and-asynchronous-command-execution-in-c-sharp-dot-net) in [HTML5](https://www.mindstick.com/articles/1535/offline-add-edit-delete-data-in-html5-indexeddb) to create menu [commands](https://www.mindstick.com/interview/817/what-is-the-use-of-dbcc-commands). We will use <menu> tag for grouping commands item. In command tag we will [define](https://yourviews.mindstick.com/audio/1110/lifestyles-choices-that-define-our-lives) command button like a [radio button](https://www.mindstick.com/articles/12743/radio-button-in-android), a [check](https://yourviews.mindstick.com/view/81033/coronavirus-does-not-check-religion) box or a button. Command [elements](https://www.mindstick.com/forum/1440/wpf-button-with-multiple-text-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 HTML5](https://www.mindstick.com/mindstickarticle/b740ff6c-f8ec-4348-9e50-7468dcecfcf4/images/85235064-d4b2-4cf3-99e1-14fd2fd28158.png)![Menu command in HTML5](https://www.mindstick.com/mindstickarticle/b740ff6c-f8ec-4348-9e50-7468dcecfcf4/images/4aaf632f-53e7-4339-83ae-bf8b4d013863.png)

\

---

Original Source: https://www.mindstick.com/articles/574/menu-command-in-html5

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
