--- title: DocumentType slug: Web/API/DocumentType tags: - API - DOM - DocumentType - Interface translation_of: Web/API/DocumentType ---
DocumentType インターフェイスは、doctype を包含する {{domxref("Node")}} を表します。
{{InheritanceDiagram}}
親インターフェイスである {{domxref("Node")}} からプロパティを継承します。また、{{domxref("ChildNode")}} インターフェイスのプロパティを実装します。
null になります。例: "<!ELEMENT foo (bar)>"。<!DOCTYPE HTML> に対して "html" といった {{domxref("DOMString")}} です。"-//W3C//DTD HTML 4.01//EN" のような {{domxref("DOMString")}} です。HTML5 では空文字列です。"http://www.w3.org/TR/html4/strict.dtd" のような {{domxref("DOMString")}} です。HTML5 では空文字列です。親インターフェイスである {{domxref("Node")}} からメソッドを継承します。また、{{domxref("ChildNode")}} インターフェイスのメソッドを実装します。
| 仕様書 | 策定状況 | コメント |
|---|---|---|
| {{SpecName('DOM WHATWG', '#documenttype', 'DocumentType')}} | {{Spec2('DOM WHATWG')}} | {{domxref("ChildNode")}} インターフェイスの実装を追加。internalSubset、entities、notation プロパティを削除。 |
| {{SpecName('DOM3 Core', 'core.html#ID-412266927', 'DocumentType')}} | {{Spec2('DOM3 Core')}} | {{SpecName('DOM2 Core')}} から変更なし。 |
| {{SpecName('DOM2 Core', 'core.html#ID-412266927', 'DocumentType')}} | {{Spec2('DOM2 Core')}} | publicID、systemID、internalSubset プロパティを追加。 |
| {{SpecName('DOM1', 'level-one-core.html#ID-412266927', 'DocumentType')}} | {{Spec2('DOM1')}} | 初期定義 |
{{Compat("api.DocumentType")}}