HTML 사전

menu

설명

The HTML menu element (<menu>) represents an unordered list of menu choices, or commands.
There is no limitation to the depth and nesting of lists defined with the <menu>, <ol> and <ul> elements.

<menu>요소는 메뉴 선택이나 명령이 정렬되지 않는 리스트를 표현한다. <menu>, <ol>, <ul>요소를 사용하는데 개수나 깊이(depth)에 제한이 없다. <menu>요소는 HTML4에서 사용을 권장하지 않는 태그였고, 오히려 <ul>요소를 권장했다. 그러나 HTML5에서 다시 부활하면서 메뉴의 속성을 가진 요소들은 <menu>요소를 사용하기 시작하는 추세이다.

Usage note :
The <menu> and <ul> both represent an unordered list of items. They differ in the way that the <ul> element only contains items to display while the <menu> element contains interactive items, to act on.
Note :
This element was deprecated in HTML4, but reintroduced in HTML5.

사용시 주의 : 
<menu>와 <ul>요소 모두 정렬되지 않은 아이템 리스트를 표현한다. 다만, <ul>요소는 단지 정렬하기 위한 아이템을 포함하고, <menu>요소는 어떤 액션을 위한 인터렉티브한 아이템을 포함한다.
주의 : 
이 요소는 HTML4에서는 사용이 중지 되었지만, HTML5에서 다시 소개된 요소이다.

Usage Context

Permitted content Either: Zero or more <li> elements.
Or: flow content.
Tag omission none, both the start tag and the end tag are mandatory
Permitted parent elements any element that accepts flow content
Normative document HTML5, section 4.11.4 (HTML4.01, section 10.4)

속성

이 엘리먼트는 전역속성을 지원한다.

type

Used to indicate the kind of menu being declared. The values defined under HTML5 are:

  • context 
    Unimplemented (see bug 617528 ) the commands of a context menu; the user can only interact with the commands if that context menu is activated  
  •  toolbar
    a list of active commands that the user can immediately interact with
  • list
    an unordered list of items (each represented by an <li> element), each of which represents a command that the user can perform or activate, or, if the element has no li element children, flow content describing available commands
  • 문맥(Context)
    시행하지 않는(617528 버그 참조) 컨텍스트 메뉴의 명령; 사용자는 컨텍스트 메뉴가 활성화 되어 있다면, 명령어로 상호작용할 수 있다.
  • 툴바
    사용자가 즉시 상호작용할 수 있는 활성화된 명령 리스트
  • 목록
    정렬되지 않는 리스트(각각 <li>요소로 표현된)들은 각각 사용자가 허용하거나 활성화한 명령을 표현한다. 또는, 요소가 <li>자식 요소가 없다면, 사용할 수 있는 명령어를 설명하는 내용 흐름(flow content 참조)을 표현한다.

label

Gives the label of the menu.

메뉴의 label 옵션을 을 제공합니다.

예제

<menu type="toolbar">
  <li>
    <menu label="File">
      <button type="button" onclick="new()">새로 만들기</button>
      <button type="button" onclick="save()">저장하기</button>
    </menu>
  </li>
  <li>
    <menu label="Edit">
      <button type="button" onclick="cut()">자르기</button>
      <button type="button" onclick="copy()">복사하기</button>
      <button type="button" onclick="paste()">붙여넣기</button>
    </menu>
  </li>
</menu>

DOM Interface

This element implements the HTMLMenuElement interface.

호환성

Desktop
기능 구글크롬 파이어폭스Gecko) 인터넷 익스플로러 Opera Safari
기본적인 지원          
Mobile
기능 안드로이드 파이어폭스 모바일(Gecko) 인터넷 익스플로러 모바일 오페라 모바일 사파리 모바일
기본적인 지원          

참고

댓글

댓글 본문
버전 관리
마법부리는곰
현재 버전
선택 버전
graphittie 자세히 보기