The Document Object Model (DOM) How a browser internally represents - - PowerPoint PPT Presentation

the document object model dom
SMART_READER_LITE
LIVE PREVIEW

The Document Object Model (DOM) How a browser internally represents - - PowerPoint PPT Presentation

The Document Object Model (DOM) How a browser internally represents an HTML document Jay Urbain, Ph.D. 1 The Document Object Model (DOM) represents the objects that comprise a web page document The hierarchical structure of the DOM depends


slide-1
SLIDE 1

1

The Document Object Model (DOM)

How a browser internally represents an HTML document Jay Urbain, Ph.D.

slide-2
SLIDE 2

The Document Object Model (DOM) represents the objects that comprise a web page document

2

The hierarchical structure of the DOM depends on the current web page content

slide-3
SLIDE 3

3

Looking closer at an Element object: Text and Attribute descendents

p em Element Here is an Text word emphasized Attribute id=“black” id=“blue” <p id=“blue”> Here is an<em id=“black”>emphasized</em> word</p> Here is an emphasized word

slide-4
SLIDE 4

4

Each Element, Attribute, or Text fragment in an HTML document is represented by a corresponding object in the DOM hierarchy

  • The DOM objects are programmatically accessible via Javascript

– These objects are called nodes – Nodes can be dynamically accessed, added, deleted, or modified

p em Here is an word emphasized id=“black” id=“blue” Element node Text node Attribute node

slide-5
SLIDE 5

5

All nodes have relationships to each other

  • Every node has a parent

except for the document (root) node

  • Most elements have

descendant nodes

p em Here is an word emphasized id=“black” id=“blue” Element node Text node Attribute node document html title body My page head

slide-6
SLIDE 6

References

  • http://www.w3.org/standards
  • http://en.wikipedia.org/wiki/HTML
  • HTML and CSS for Beginners with HTML5, Mark Lassoff