Repository navigation
Expand file tree
/
Copy pathindex.md
More file actions
109 lines (89 loc) · 2.87 KB
/
Copy pathindex.md
File metadata and controls
109 lines (89 loc) · 2.87 KB
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
105
106
107
108
109
---
title: "<code>: 인라인 코드 요소"
slug: Web/HTML/Reference/Elements/code
original_slug: Web/HTML/Element/code
---
{{HTMLSidebar}}
**HTML `<code>` 요소**는 짧은 코드 조각을 나타내는 스타일을 사용해 자신의 콘텐츠를 표시합니다. 기본 스타일은 {{glossary("user agent", "사용자 에이전트")}}의 고정폭 글씨체입니다.
{{InteractiveExample("HTML Demo: <code>", "tabbed-shorter")}}
```html interactive-example
<p>
The <code>push()</code> method adds one or more elements to the end of an
array and returns the new length of the array.
</p>
```
```css interactive-example
code {
background-color: #eee;
border-radius: 3px;
font-family: courier, monospace;
padding: 0 3px;
}
```
<table class="properties">
<tbody>
<tr>
<th scope="row">
<a href="/ko/docs/Web/HTML/Guides/Content_categories">콘텐츠 카테고리</a>
</th>
<td>
<a href="/ko/docs/Web/HTML/Guides/Content_categories#플로우_콘텐츠"
>플로우 콘텐츠</a
>,
<a href="/ko/docs/Web/HTML/Guides/Content_categories#구문_콘텐츠"
>구문 콘텐츠</a
>, 뚜렷한 콘텐츠.
</td>
</tr>
<tr>
<th scope="row">가능한 콘텐츠</th>
<td>
<a href="/ko/docs/Web/HTML/Guides/Content_categories#구문_콘텐츠"
>구문 콘텐츠</a
>.
</td>
</tr>
<tr>
<th scope="row">태그 생략</th>
<td>불가능, 시작과 끝에 태그를 추가하는 것은 필수입니다.</td>
</tr>
<tr>
<th scope="row">가능한 부모 요소</th>
<td>
<a href="/ko/docs/Web/HTML/Guides/Content_categories#구문_콘텐츠"
>구문 콘텐츠</a
>를 허용하는 모든 요소.
</td>
</tr>
<tr>
<th scope="row">가능한 ARIA 역할</th>
<td>모두</td>
</tr>
<tr>
<th scope="row">DOM 인터페이스</th>
<td>{{domxref("HTMLElement")}}</td>
</tr>
</tbody>
</table>
## 특성
이 요소는 [전역 특성](/ko/docs/Web/HTML/Reference/Global_attributes)만 포함합니다.
## 예제
```html
<p>
함수 <code>selectAll()</code>는 입력 필드의 모든 텍스트를 선택하므로, 사용자가
복사 혹은 삭제를 손쉽게 할 수 있습니다.
</p>
```
{{EmbedLiveSample("예제", 640, 70)}}
## 참고
여러 줄의 코드를 나타내려면 `<code>` 요소를 {{htmlelement("pre")}}로 감싸세요. 보통 상황에서 `<code>`는 코드 한 줄만 나타냅니다.
CSS `code` 태그 선택자를 사용해 브라우저의 기본 글씨체를 바꿀 수 있습니다. 그러나 사용자 설정이 CSS보다 우선할 수도 있습니다.
## 명세
{{Specifications}}
## 브라우저 호환성
{{Compat}}
## 같이 보기
- {{HTMLElement("samp")}}
- {{HTMLElement("kbd")}}
- {{HTMLElement("var")}}
- {{HTMLElement("pre")}}