bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/JavaScript/DOM and Browser APIs
JavaScript•DOM and Browser APIs

HTML DOM Document

Flash cards

Review the key moves

1/3
Core idea

What is the main idea behind HTML DOM Document?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

Revised January 2026

NameDescription
activeElementReturns the currently focused element in the document
addEventListener()Attaches an event handler to the document
adoptNode()Adopts a node from another document
anchorsDEPRECATED
appletsDEPRECATED
baseURIReturns the absolute base URI of a document
bodySets or returns the document's body (the <body> element)
charsetDEPRECATED
characterSetReturns the character encoding for the document
close()Closes the output stream previously opened with document.open()
cookieReturns all name/value pairs of cookies in the document
createAttribute()Creates an attribute node
createComment()Creates a Comment node with the specified text
createDocumentFragment()Creates an empty DocumentFragment node
createElement()Creates an Element node
createEvent()Creates a new event
createTextNode()Creates a Text node
defaultViewReturns the window object associated with a document, or null if none is available.
designModeControls whether the entire document should be editable or not.
doctypeReturns the Document Type Declaration associated with the document
documentElementReturns the Document Element of the document (the <html> element)
documentModeDEPRECATED
documentURISets or returns the location of the document
domainReturns the domain name of the server that loaded the document
domConfigDEPRECATED
embedsReturns a collection of all <embed> elements the document
execCommand()DEPRECATED
formsReturns a collection of all <form> elements in the document
getElementById()Returns the element that has the ID attribute with the specified value
getElementsByClassName()Returns an HTMLCollection containing all elements with the specified class name
getElementsByName()Returns an live NodeList containing all elements with the specified name
getElementsByTagName()Returns an HTMLCollection containing all elements with the specified tag name
hasFocus()Returns a Boolean value indicating whether the document has focus
headReturns the <head> element of the document
imagesReturns a collection of all <img> elements in the document
implementationReturns the DOMImplementation object that handles this document
importNode()Imports a node from another document
inputEncodingDEPRECATED
lastModifiedReturns the date and time the document was last modified
linksReturns a collection of all <a> and <area> elements in the document that have a href attribute
normalize()Removes empty Text nodes, and joins adjacent nodes
normalizeDocument()DEPRECATED
open()Opens an HTML output stream to collect output from document.write()
querySelector()Returns the first element that matches a specified CSS selector(s) in the document
querySelectorAll()Returns a static NodeList containing all elements that matches a specified CSS selector(s) in the document
readyStateReturns the (loading) status of the document
referrerReturns the URL of the document that loaded the current document
removeEventListener()Removes an event handler from the document (that has been attached with the addEventListener() method)
renameNode()DEPRECATED
scriptsReturns a collection of <script> elements in the document
strictErrorCheckingDEPRECATED
titleSets or returns the title of the document
URLReturns the full URL of the HTML document
write()Writes HTML expressions or JavaScript code to a document
writeln()Same as write(), but adds a newline character after each statement

Previous

HTML DOM Animation

Next

JavaScript Events