Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 644559 of DOM

  • Revision slug: Glossary/DOM
  • Revision title: DOM
  • Revision id: 644559
  • Created:
  • Creator: hoosteeno
  • Is current revision? No
  • Comment Editorial review: some structure and grammar changes.

Revision Content

Summary

The Document Object Model (DOM) is an API defined by the W3C to represent and interact with any HTML or XML document.

In Depth

The DOM is a model of an {{Glossary("HTML")}} or {{Glossary("XML")}} document that is loaded in a web browser. It represents a document as a tree of nodes, where each node represents a portion of the document, such as an {{Glossary("element")}}, a portion of text or a comment.

The DOM is one of the most used {{Glossary("API")}}s on the web because it allows code running in a web browser to access and interact with every node in the document.  Nodes can be created, moved and changed. Event listeners can be added to nodes. Once a given event occurs all of its event listeners are triggered.

The early versions of the DOM were not specified and came from the first {{Glossary("Browser","browsers")}} implementing {{Glossary("JavaScript")}}. This legacy DOM is sometime refered as DOM 0. Today, the DOM specification is lead by the {{Glossary("W3C")}} and the DOM Working Group is currently working on the fourth version of the DOM specification.

Know more

General Knowledge

Technical information

Revision Source

<h2 id="Summary">Summary</h2>
<p>The <strong>Document Object Model (DOM)</strong> is an API defined by the W3C to represent and interact with any HTML or XML document.</p>
<h2 id="In_Depth">In Depth</h2>
<p>The <span style="font-size: 14px; line-height: 1.5;">DOM </span>is a model of an {{Glossary("HTML")}} or {{Glossary("XML")}} document that is loaded in a web browser. <span style="font-size: 14px; line-height: 1.5;">It represents a </span><span style="font-size: 14px; line-height: 1.5;">document as a tree of nodes, where each node represents a portion of the document, such as an {{Glossary("element")}}, a portion of text or a comment. </span></p>
<p><span style="font-size: 14px; line-height: 1.5;">The DOM is one of the most used {{Glossary("API")}}s on the web because it </span>allows code running in a web browser to access and interact with every node in the document.&nbsp;<span style="font-size: 14px; line-height: 1.5;"> Nodes can be created, moved and changed. Event listeners can be added to nodes. Once a given event occurs all of its event listeners are triggered.</span></p>
<p><span style="font-size: 14px; line-height: 1.5;">The early versions of the DOM were not specified and came from the first {{Glossary("Browser","browsers")}} implementing {{Glossary("JavaScript")}}. This legacy DOM is sometime refered as DOM 0. Today, the DOM specification is lead by the {{Glossary("W3C")}} and the DOM Working Group is currently working on the fourth version of the DOM specification.</span></p>
<h2 id="Know_more">Know more</h2>
<h3 id="General_Knowledge">General Knowledge</h3>
<ul>
 <li><a href="https://en.wikipedia.org/wiki/Document_Object_Model" rel="external">The Document Object Model on Wikipedia</a></li>
</ul>
<h3 id="Technical_information">Technical information</h3>
<ul>
 <li><a href="/en-US/docs/DOM">The DOM documentation on MDN</a></li>
 <li><a href="https://www.w3.org/DOM/DOMTR" rel="external">The various DOM specifications at W3C</a></li>
</ul>
Revert to this revision