Name
DOMImplementation.createHTMLDocument( ) — create a skeletal HTML document
Availability
DOM Level 2 HTML
Synopsis
HTMLDocument createHTMLDocument(String title);Arguments
-
title The title of the document. This text is used as the content of the
<title>element of the newly created document.
Returns
The new HTMLDocument object.
Description
This method creates a new HTMLDocument object with a skeletal
document tree that includes the specified title. The
documentElement property of the returned object is
an <html> element, and this root element has
<head> and <body>
tags as its children. The <head> element in
turn has a <title> child, which has the
specified title string as its child.
createHTMLDocument( ) is defined not by the
DOMImplementation interface but by its HTMLDOMImplementation
subinterface. If an implementation supports the “HTML”
feature, its DOMImplementation object implements this method.
See Also
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