DocumentType: name property - Web APIs | MDN

Value

A string.

Examples

js

const docType = document.implementation.createDocumentType("html", "", "");

console.log(docType.name); // Displays `html`

Specifications

Specification
DOM
# dom-documenttype-name

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.