--- title: Comment slug: Web/API/Comment tags: - API - DOM - Reference translation_of: Web/API/Comment ---
Comment 인터페이스는 마크업 내의 텍스트 표기인 주석을 나타냅니다. 주석은 화면에 보여지지 않지만 웹 페이지의 소스에서 확인할 수 있습니다. HTML과 XML에서 주석은 '<!--' 표기와 '-->' 사이의 내용입니다. XML의 주석 내용에는 '--'을 포함할 수 없습니다.
{{InheritanceDiagram}}
Comment 인터페이스는 별도의 속성을 갖지 않지만 부모인 {{domxref("CharacterData")}}와, 그 부모인 {{domxref("Node")}}의 속성을 상속합니다.
Comment 객체를 반환합니다.Comment 인터페이스는 별도의 메서드를 갖지 않지만 부모인 {{domxref("CharacterData")}}와, 그 부모인 {{domxref("Node")}}의 메서드를 상속합니다.
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('DOM WHATWG', '#comment', 'Comment')}} | {{Spec2('DOM WHATWG')}} | Added the constructor. |
| {{SpecName('DOM3 Core', 'core.html#ID-1728279322', 'Comment')}} | {{Spec2('DOM3 Core')}} | No change from {{SpecName('DOM2 Core')}} |
| {{SpecName('DOM2 Core', 'core.html#ID-1728279322', 'Comment')}} | {{Spec2('DOM2 Core')}} | No change from {{SpecName('DOM1')}} |
| {{SpecName('DOM1', 'level-one-core.html#ID-1728279322', 'Comment')}} | {{Spec2('DOM1')}} | Initial definition |
{{Compat("api.Comment")}}