asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > MENU Element

<menu> Element


Represents a list of items, usually a list of links.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

The <menu> element displays a list of items. Like the UL element, menu is used with LI elements to define the individual items in the list.

menu is typically used to provide a list of links.

NOTE: This element has been deprecated in favor of the <ul> element.

Attributes

The <menu> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

The following example shows how the <menu> element may be used.

<menu>
   <li><a href="http://www.cnn.com">CNN</a>
   <li><a href="http://www.yahoo.com">Yahoo</a>
   <li><a href="http://www.msn.com">Microsoft Network</a>
</menu>

which would render on a Web page as

  • CNN
  • Yahoo
  • Microsoft Network
  • The following example shows how to make the menu element behave like a horizontal toolbar, using CSS.

    /* HTML */
    <menu>
       <li><button>Home</button></li>
       <li><button>HTML</button></li>
       <li><button>CSS</button></li>
    </menu>
    /* CSS */
    menu {
       display: flex; list-style: none;
       padding: 0; width: 300px;
    }
    li { flex-grow: 1 }
    button { width: 98% }

    which would render on a Web page as

  • External References

    See Also

    DIR   LI   OL   UL   Using Lists in HTML



    Check out related books at Amazon

    © 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

    If you have any question, comment or suggestion
    about this site, please send us a note