- HTML Tutorial
- HTML - Home
- HTML - Introduction
- HTML - Editors
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Headings
- HTML - Paragraphs
- HTML - Fonts
- HTML - Blocks
- HTML - Style Sheet
- HTML - Formatting
- HTML - Quotations
- HTML - Comments
- HTML - Colors
- HTML - Images
- HTML - Image Map
- HTML - Iframes
- HTML - Phrase Elements
- HTML - Meta Tags
- HTML - Classes
- HTML - IDs
- HTML - Backgrounds
- HTML Tables
- HTML - Tables
- HTML - Headers & Caption
- HTML - Table Styling
- HTML - Table Colgroup
- HTML - Nested Tables
- HTML Lists
- HTML - Lists
- HTML - Unordered Lists
- HTML - Ordered Lists
- HTML - Definition Lists
- HTML Links
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML Color Names & Values
- HTML - Color Names
- HTML - RGB
- HTML - HEX
- HTML - HSL
- HTML Forms
- HTML - Forms
- HTML - Form Attributes
- HTML - Form Control
- HTML - Input Attributes
- HTML Media
- HTML - Video Element
- HTML - Audio Element
- HTML - Embed Multimedia
- HTML Header
- HTML - Head Element
- HTML - Adding Favicon
- HTML - Javascript
- HTML Layouts
- HTML - Layouts
- HTML - Layout Elements
- HTML - Layout using CSS
- HTML - Responsiveness
- HTML - Symbols
- HTML - Emojis
- HTML - Style Guide
- HTML Graphics
- HTML - SVG
- HTML - Canvas
- HTML APIs
- HTML - Geolocation API
- HTML - Drag & Drop API
- HTML - Web Workers API
- HTML - WebSocket
- HTML - Web Storage
- HTML - Server Sent Events
- HTML Miscellaneous
- HTML - MathML
- HTML - Microdata
- HTML - IndexedDB
- HTML - Web Messaging
- HTML - Web CORS
- HTML - Web RTC
- HTML Demo
- HTML - Audio Player
- HTML - Video Player
- HTML - Web slide Desk
- HTML Tools
- HTML - Velocity Draw
- HTML - QR Code
- HTML - Modernizer
- HTML - Validation
- HTML - Color Picker
- HTML References
- HTML - Cheat Sheet
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
- HTML Resources
- HTML - Quick Guide
- HTML - Useful Resources
- HTML - Color Code Builder
- HTML - Online Editor
HTML - <menu> Tag
HTML <menu> tag is used for creating a menu list of content. We can use the <li> tag to create list items inside of menu item.
HTML <menu> tag is deprecated in HTML4 and re-introduced in HTML5. But it is better to ignore this tag as it is experimental and not supported by many browsers.
Syntax
<menu> ... ... <menu>
Attribute
HTML menu tag supports Global and Event attributes of HTML. Accepts some specific attributes as well which are listed below.
Attribute | Value | Description |
---|---|---|
label | text | Specifies a visible label. |
type |
popup toolbar context |
Specifies the type of menu to be displayed. |
Examples of HTML menu Tag
Bellow examples will illustrate the usage of menu tag. Where, when and how to use menu tag to create menu list.
Create menu Item using menu Tag
Let's look at the following example, where we are going to use the menu tag.
<!DOCTYPE html> <html> <head> <title>HTML menu Tag</title> </head> <body> <menu> <li>ol - Ordered list</li> <li>ul - Unordered list</li> <li>dir - Directory list</li> <li>menu - Menu list</li> </menu> </body> </html>
Styling menu Item using CSS
Here in this example we will style the menu element using internal CSS.
<!DOCTYPE html> <html> <head> <title>HTML menu Tag</title> <style> menu { display: flex; list-style: none; padding: 10px; width: 600px; } li { flex-grow: 1; } button { width: 100%; padding: 10px; background-color: lightgray; font-weight: 600; } </style> </head> <body> <menu> <li><button onclick="html()">HTML</button></li> <li><button onclick="css()">CSS</button></li> <li><button onclick="js()">JS</button></li> </menu> </body> </html>
Supported Browsers
Tag | |||||
---|---|---|---|---|---|
menu | Yes | Yes | Yes | Yes | Yes |
html_tags_reference.htm
Advertisements
To Continue Learning Please Login
Login with Google