Document Object Model and Intel XDK

DOM stands for Document Object Model. It is what the User Agent (for example a browser) produces in memory when it encounters an HTML Document .
An HTML document is really a text file with mark ups (using tags). Here is an example:
<title>About Me</title>
<h1>My origins</h1>

This is a tree of elements and some text.
The element looks like this:

In the html document above, the elements are: <html></html><br /><head></head><br /><title></title><br /><body></body> 
The <html></html> elements contains the rest of the elements.The <head></head> element has the <title></title> element The <title></title>just contains a string

The <body></body> can contain many more elements.The above tree is how it would be seen by the browser to create a tree, the DOM tree or simply the tree.
The DOM tree not including the spaces and carriage returns is simply this:

In a practical example like a single page mobile app (which also follows the same principles asweb page) like this one in Intel the document may have a slightly different look, but the emulating browser as well as the device browser would evaluate the document based on this DOM tree shown here.

Post a Comment

Popular posts from this blog

Develop a Side Menu App using Intel XDK - Part 1

Setting up Kid's Corner on Windows 10 Phone

Intel XDK: Controls 6: Using the Google Map Widget