| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/Comment | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since July 2015.
The Comment interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view.
Comments are represented in HTML and XML as content between <!-- and -->. In XML, like inside SVG or MathML markup, the character sequence -- cannot be used within a comment.
This interface has no specific property, but inherits those of its parent, CharacterData, and indirectly those of Node.
Comment()Returns a new Comment object with the parameter as its textual content. If not present, its default value is the empty string, ''.
This interface has no specific method, but inherits those of its parent, CharacterData, and indirectly those of Node.
| Specification |
|---|
| DOM # interface-comment |
This page was last modified on Sep 24, 2024 by MDN contributors.
CommentAbortControllerAbortSignalAbstractRangeAttrCDATASectionCharacterDataCustomEventDOMErrorDOMExceptionDOMImplementationDOMParserDOMTokenListDocumentDocumentFragmentDocumentTypeElementEventEventTargetHTMLCollectionMutationObserverMutationRecordNamedNodeMapNodeNodeIteratorNodeListProcessingInstructionQuotaExceededErrorRangeShadowRootStaticRangeTextTreeWalkerXMLDocumentXPathEvaluatorXPathExpressionXPathResultXSLTProcessorYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |