aboutsummaryrefslogtreecommitdiff
path: root/files/ko/web/html/element/output/index.html
blob: 24e154783d0846d767ed3aadf9776b4c784ccffe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
title: '<output>: 출력 요소'
slug: Web/HTML/Element/output
tags:
  - Element
  - HTML
  - HTML forms
  - 'HTML:Flow content'
  - Reference
  - Web
translation_of: Web/HTML/Element/output
---
<div>{{HTMLRef}}</div>

<p><span class="seoSummary"><strong>HTML <code>&lt;output&gt;</code> 요소</strong>는 웹 사이트나 앱에서 계산이나 사용자 행동의 결과를 삽입할 수 있는 컨테이너 요소입니다.</span></p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/ko/docs/Web/Guide/HTML/Content_categories">콘텐츠 카테고리</a></th>
   <td><a href="/ko/docs/Web/Guide/HTML/Content_categories#플로우_콘텐츠">플로우 콘텐츠</a>, <a href="/ko/docs/Web/Guide/HTML/Content_categories#구문_콘텐츠">구문 콘텐츠</a>, <a href="/ko/docs/Web/Guide/HTML/Content_categories#양식_관련_콘텐츠">양식 관련 콘텐츠</a>(나열됨, 레이블 가능, 초기화 가능), 뚜렷한 콘텐츠.</td>
  </tr>
  <tr>
   <th scope="row">가능한 콘텐츠</th>
   <td><a href="/ko/docs/Web/Guide/HTML/Content_categories#구문_콘텐츠">구문 콘텐츠</a>.</td>
  </tr>
  <tr>
   <th scope="row">태그 생략</th>
   <td>{{no_tag_omission}}</td>
  </tr>
  <tr>
   <th scope="row">가능한 부모 요소</th>
   <td><a href="/ko/docs/Web/Guide/HTML/Content_categories#구문_콘텐츠">구문 콘텐츠</a>를 허용하는 모든 요소.</td>
  </tr>
  <tr>
   <th scope="row">가능한 ARIA 역할</th>
   <td>모두</td>
  </tr>
  <tr>
   <th scope="row">DOM 인터페이스</th>
   <td>{{domxref("HTMLOutputElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="특성">특성</h2>

<p><span style="line-height: 21px;">이 요소는 </span><a href="/ko/docs/Web/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">전역 특성</a>을 포함합니다.</p>

<dl>
 <dt>{{htmlattrdef("for")}}</dt>
 <dd>스페이스로 구분한, 다른 여러 요소 {{htmlattrxref("id")}}의 목록. 목록에 포함된 요소가 출력 결과에 공헌했거나 영향을 주었음을 나타냅니다.</dd>
 <dt>{{htmlattrdef("form")}}</dt>
 <dd><code>&lt;output&gt;</code>과 연결할 {{HTMLElement("form")}} 요소("양식 소유자"). 같은 문서에 존재하는 <code>&lt;form&gt;</code> 요소의 {{htmlattrxref("id")}} 특성 값을 사용해야 합니다. <code>form</code> 특성을 지정하지 않았으나 조상 중 <code>&lt;form&gt;</code> 요소가 존재하면 해당 <code>&lt;form&gt;</code>과 연결됩니다.</dd>
 <dd><code>form</code> 특성을 사용하면 <code>&lt;output&gt;</code><code>&lt;form&gt;</code> 요소에 넣지 않고도 연결할 수 있고, 조상 중 <code>&lt;form&gt;</code>이 있더라도 소유자를 재정의할 수 있습니다.</dd>
 <dt>{{htmlattrdef("name")}}</dt>
 <dd>요소의 이름. {{domxref("HTMLFormElement.elements", "form.elements")}} API에서 사용합니다.</dd>
</dl>

<p><code>&lt;output&gt;</code>의 값, 이름, 콘텐츠는 양식 전송 시 제출되지 않습니다.</p>

<h2 id="예제">예제</h2>

<pre class="brush: html">&lt;form oninput="result.value=parseInt(a.value)+parseInt(b.value)"&gt;
  &lt;input type="range" id="b" name="b" value="50" /&gt; +
  &lt;input type="number" id="a" name="a" value="10" /&gt; =
  &lt;output name="result" for="a b"&gt;60&lt;/output&gt;
&lt;/form&gt;</pre>

<p>{{ EmbedLiveSample('예제')}}</p>

<h2 id="접근성_고려사항">접근성 고려사항</h2>

<p>많은 브라우저는 <code>&lt;output&gt;</code>을 마치 <code><a href="/ko/docs/Web/Accessibility/ARIA/ARIA_Live_Regions">aria-live</a></code> 특성이 존재하는 것처럼 구현합니다. 따라서 접근성 기술은 포커스가 바뀌지 않더라도 <code>&lt;output&gt;</code> 내부의 UI 상호작용 결과를 표현할 것입니다.</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', 'forms.html#the-output-element', '&lt;output&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td></td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'sec-forms.html#the-output-element', '&lt;output&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td></td>
  </tr>
 </tbody>
</table>

<h2 id="브라우저_호환성">브라우저 호환성</h2>



<p>{{Compat("html.elements.output")}}</p>