Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 838 Bytes

File metadata and controls

31 lines (24 loc) · 838 Bytes

08. What is a DOM?

  • DOM stands for Document Object Model
  • DOM is a programming API for HTML & XML documents
  • DOM represent the HTML & XML documents as nodes and objects. So that it can be manipulated via javascript
  • DOM construction resembles a tree based structure

Example:

<table>
  <tbody> 
    <tr> 
      <td>Shady Grove</td>
      <td>Aeolian</td> 
    </tr> 
    <tr>
      <td>Over the River, Charlie</td>        
      <td>Dorian</td> 
    </tr> 
  </tbody>
</table>

Above HTML is represented as a tree based structure like below.

Graphical Representation:

DOM Tree

Some more information.