HTML <del> 요소는 문서에서 제거된 텍스트의 범위를 나타냅니다. 문서나 소스 코드의 변경점 추적 등에 사용할 수 있습니다. {{htmlelement("ins")}} 요소를 추가된 텍스트의 범위를 나타낼 수 있습니다.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
| 콘텐츠 카테고리 | 플로우 콘텐츠, 구문 콘텐츠. |
|---|---|
| 가능한 콘텐츠 | 투명. |
| 태그 생략 | {{no_tag_omission}} |
| 가능한 부모 요소 | 구문 콘텐츠를 허용하는 모든 요소. |
| 가능한 ARIA 역할 | 모두 |
| DOM 인터페이스 | {{domxref("HTMLModElement")}} |
이 요소는 전역 특성을 포함합니다.
<p><del>This text has been deleted</del>, here is the rest of the paragraph.</p> <del><p>This paragraph has been deleted.</p></del>
{{EmbedLiveSample("예제")}}
대부분의 스크린 리더는 기본값에서 <del> 요소의 존재를 표현하지 않습니다. 그러나 CSS {{cssxref("content")}} 속성과 {{cssxref("::before")}}, {{cssxref("::after")}} 의사 요소를 사용하면 소리내어 읽도록 할 수 있습니다.
del::before,
del::after {
clip-path: inset(100%);
clip: rect(1px, 1px, 1px, 1px);
height: 1px;
overflow: hidden;
position: absolute;
white-space: nowrap;
width: 1px;
}
del::before {
content: " [제거 부분 시작] ";
}
del::after {
content: " [제거 부분 끝] ";
}
스크린 리더 사용자 일부는 지나치게 자세한 안내를 유발할 수 있는 콘텐츠의 표현을 의도적으로 꺼놓습니다. 그러므로 이 방식을 남용해선 안되며, 콘텐츠의 이해에 삭제 여부가 꼭 필요할 때만 사용해야 합니다.
| 명세 | 상태 | 주석 |
|---|---|---|
| {{SpecName('HTML WHATWG', 'edits.html#the-del-element', '<del>')}} | {{Spec2('HTML WHATWG')}} | |
| {{SpecName('HTML5 W3C', 'edits.html#the-del-element', '<del>')}} | {{Spec2('HTML5 W3C')}} | |
| {{SpecName('HTML4.01', 'struct/text.html#h-9.4', '<del>')}} | {{Spec2('HTML4.01')}} |
{{Compat("html.elements.del")}}