HTML <del> 태그
예시
삭제된 부분과 새로 삽입된 부분이 있는 텍스트:
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
아래에서 더 많은 "직접 사용해 보기" 예를 살펴보세요.
정의 및 사용
<del>
태그는 문서에서 삭제된 텍스트를 정의합니다 . 브라우저는 일반적으로 삭제된 텍스트에 줄을 긋습니다.
팁 및 참고 사항
팁: 삽입된 텍스트를 마크업하려면 <ins> 태그 도 살펴보세요 .
브라우저 지원
Element | |||||
---|---|---|---|---|---|
<del> | Yes | Yes | Yes | Yes | Yes |
속성
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies a URL to a document that explains the reason why the text was deleted/changed |
datetime | YYYY-MM-DDThh:mm:ssTZD | Specifies the date and time of when the text was deleted/changed |
전역 속성
<del>
태그는 HTML의 전역 속성도 지원 합니다 .
이벤트 속성
<del>
태그는 HTML의 이벤트 속성 도 지원합니다 .
더 많은 예
예시
CSS를 사용하여 <del> 및 <ins> 스타일 지정:
<html>
<head>
<style>
del {background-color:
tomato;}
ins {background-color: yellow;}
</style>
</head>
<body>
<p>My favorite color is <del>blue</del> <ins>red</ins>!</p>
</body>
</html>
관련 페이지
HTML DOM 참조: Del 개체
기본 CSS 설정
대부분의 브라우저는 <del>
다음 기본값으로 요소를 표시합니다.
예시
del {
text-decoration: line-through;
}