Name
DocumentType — the <!DOCTYPE> declaration of a document
Inherits from
Node
Synopsis
This infrequently used type represents the <!DOCTYPE> declaration of a
document. The doctype property of a Document
holds the DocumentType node for that document. DocumentType nodes
are immutable and cannot be modified in any way.
DocumentType nodes are used to create new Document objects
with DOMImplementation. create
Document(). You can
create new DocumentType objects with DOMImplementation.createDocumentType().
Properties
readonly stringnameThe name of the document type. This identifier immediately follows
<!DOCTYPE>at the start of a document, and it is the same as the tag name of the document’s root element. For HTML documents, this will be “html”.readonly stringpublicIdThe public identifier of the DTD, or the empty string if none was specified.
readonly stringsystemIdThe system identifier of the DTD, or the empty string if none was specified.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access