aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/html/element/menu
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
commitda78a9e329e272dedb2400b79a3bdeebff387d47 (patch)
treee6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/ko/web/html/element/menu
parent1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff)
downloadtranslated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip
initial commit
Diffstat (limited to 'files/ko/web/html/element/menu')
-rw-r--r--files/ko/web/html/element/menu/index.html132
1 files changed, 132 insertions, 0 deletions
diff --git a/files/ko/web/html/element/menu/index.html b/files/ko/web/html/element/menu/index.html
new file mode 100644
index 0000000000..c6034eb98e
--- /dev/null
+++ b/files/ko/web/html/element/menu/index.html
@@ -0,0 +1,132 @@
+---
+title: <menu>
+slug: Web/HTML/Element/menu
+translation_of: Web/HTML/Element/menu
+---
+<div>{{HTMLRef}}{{SeeCompatTable}}</div>
+
+<p><strong>HTML <code>&lt;menu&gt;</code> 요소</strong>는 사용자가 수행하거나 하는 명령 묶음을 말합니다. 이것은 스크린 위에 나오는 목록 메뉴와 눌려진 버튼 아래에 나오는 것과 같은 맥락 메뉴를 포함합니다.</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row"><a href="/en-US/docs/Web/HTML/Content_categories">Content categories</a></th>
+ <td><a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">Flow content</a>. Additionally, if in the <em>list menu</em> state, palpable content. (<em>list menu</em> is the default state, unless the parent element is a {{HTMLElement("menu")}} in the <em>context menu</em> state.)</td>
+ </tr>
+ <tr>
+ <th scope="row">Permitted content</th>
+ <td>If the element is in the <em>list menu</em> state: <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">flow content</a>, or alternatively, zero or more occurrences of {{HTMLElement("li")}}, {{HTMLElement("script")}}, and {{HTMLElement("template")}}.<br>
+ If the element is in the <em>context menu</em> state: zero or more occurrences, in any order, of {{HTMLElement("menu")}} (<em>context menu</em> state only), {{HTMLElement("menuitem")}}, {{HTMLElement("hr")}}, {{HTMLElement("script")}}, and {{HTMLElement("template")}}.</td>
+ </tr>
+ <tr>
+ <th scope="row">Tag omission</th>
+ <td>{{no_tag_omission}}</td>
+ </tr>
+ <tr>
+ <th scope="row">Permitted parent elements</th>
+ <td>Any element that accepts <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">flow content</a>.</td>
+ </tr>
+ <tr>
+ <th scope="row">DOM interface</th>
+ <td>{{domxref("HTMLMenuElement")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="속성">속성</h2>
+
+<p>이 요소는 <a href="/en-US/docs/Web/HTML/Global_attributes">전역 속성</a>을 포함합니다.</p>
+
+<dl>
+ <dt>{{htmlattrdef("label")}}</dt>
+ <dd>사용자에게 보여지는 메뉴의 이름입니다. Used within nested menus, to provide a label through which the submenu can be accessed. Must only be specified when the parent element is a {{HTMLElement("menu")}} in the <em>context menu</em> state.</dd>
+ <dt>{{htmlattrdef("type")}}</dt>
+ <dd>This attribute indicates the kind of menu being declared, and can be one of two values.
+ <ul>
+ <li><code>context</code>: The <em>context menu</em> state, which represents a group of commands activated through another element. This might be through the {{htmlattrxref("menu", "button")}} attribute of a {{HTMLElement("button")}}, or an element with a <a href="/en-US/docs/HTML/Global_attributes#attr-contextmenu"><code>contextmenu</code></a> attribute. When nesting {{HTMLElement("menu")}} elements directly within one another, this is the missing value default if the parent is already in this state.</li>
+ <li><code>list</code>: The <em>list menu</em> state, which represents a series of commands for user interaction. This is the missing value default, except where the parent element is a {{HTMLElement("menu")}} in the <em>context menu</em> state.</li>
+ </ul>
+ </dd>
+</dl>
+
+<h2 id="Examples">Examples</h2>
+
+<h3 id="Example_1">Example 1</h3>
+
+<pre class="brush: html">&lt;!-- A button, which displays a menu when clicked. --&gt;
+&lt;button type="menu" menu="dropdown-menu"&gt;
+ Dropdown
+&lt;/button&gt;
+
+&lt;menu type="context" id="dropdown-menu"&gt;
+ &lt;menuitem label="Action"&gt;
+ &lt;menuitem label="Another action"&gt;
+ &lt;hr&gt;
+ &lt;menuitem label="Separated action"&gt;
+&lt;/menu&gt;
+</pre>
+
+<h3 id="Result">Result</h3>
+
+<p>{{EmbedLiveSample('Example_1')}}</p>
+
+<h3 id="Example_2">Example 2</h3>
+
+<pre class="brush: html">&lt;!-- A context menu for a simple editor, containing two menu buttons. --&gt;
+&lt;menu&gt;
+ &lt;li&gt;
+ &lt;button type="menu" value="File" menu="file-menu"&gt;
+ &lt;menu type="context" id="file-menu"&gt;
+ &lt;menuitem label="New..." onclick="newFile()"&gt;
+ &lt;menuitem label="Save..." onclick="saveFile()"&gt;
+ &lt;/menu&gt;
+ &lt;/li&gt;
+ &lt;li&gt;
+ &lt;button type="menu" value="Edit" menu="edit-menu"&gt;
+ &lt;menu type="context" id="edit-menu"&gt;
+ &lt;menuitem label="Cut..." onclick="cutEdit()"&gt;
+ &lt;menuitem label="Copy..." onclick="copyEdit()"&gt;
+ &lt;menuitem label="Paste..." onclick="pasteEdit()"&gt;
+ &lt;/menu&gt;
+ &lt;/li&gt;
+&lt;/menu&gt;
+</pre>
+
+<h3 id="Result_2">Result</h3>
+
+<p>{{EmbedLiveSample('Example_2')}}</p>
+
+<h2 id="명세">명세</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'interactive-elements.html#the-menu-element', '&lt;menu&gt;')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5.1', 'interactive-elements.html#the-menu-element', '&lt;menu&gt;')}}</td>
+ <td>{{Spec2('HTML5.1')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="브라우저_호환성">브라우저 호환성</h2>
+
+<p>{{Compat("html.elements.menu")}}</p>
+
+<h2 id="같이_보기">같이 보기</h2>
+
+<ul>
+ <li>Other list-related HTML Elements: {{HTMLElement("ol")}}, {{HTMLElement("ul")}}, {{HTMLElement("li")}} and the obsolete {{HTMLElement("dir")}}.</li>
+ <li>The <a href="/en-US/docs/HTML/Global_attributes#attr-contextmenu"><code>contextmenu</code></a> <a href="/en-US/docs/HTML/Global_attributes">global attribute</a> can be used on an element to refer to the <code>id</code> of a <code>menu</code> with the <code>context</code> {{htmlattrxref("type","menu")}}.</li>
+</ul>