Document Object Model

Document Object Model

  • Representation of HTML documents as a DOM tree

  • HTML Tags as DOM nodes forming a DOM tree

DOM

index.html

<!DOCTYPE html>
<html>
</html>
  <head>
    <title>Shrek</title>
  </head>
  <body>
    <h1>Shrek</h1>
    <div>
      <h3>Hello World</h3>
      <p>Lorem ipsum</p>
      <img src="shrek.gif">
    </div>
  </body>
</html>
        

Crash Course: Document Object Model (DOM)

By Arnold Tan

Crash Course: Document Object Model (DOM)

  • 432