Explain The Document Object Model

Improved Essays
3. Explain the Document Object Model.

One of the most important matters to know about when using JavaScript is the DOM, or Document Object Model. To describe it simply, it is a way for your HTML and JavaScript to interact and how the JavaScript is able to do its job. It is very important in order to get the code to work.

The Document Object Model is basically a mapping layout model for the HTML. To put it more simply it takes the HTML and treats it kind of like a tree structure. The overall part is the document and within the document is the HTML, and within that is the head and body tags and so on. This shows the layout of the model to look tree-like. These sections can be described in parent, child, and siblings and are known as nodes. The parent nodes would be the HTML tags and the children of that could be the head and body tags. The head and body tags then would be called sibling nodes. These nodes also have various types. There is the element node, text node, attribute node and document node. The document node is the first node encompassing all the rest.

Element nodes are the one that will make up most of your document. These are the tags you use for structure around any information you have. The body, html, paragraph, and even the heading nodes make up these element nodes. You might think that the heading and paragraph tags would be text nodes, but that is not the case.

Text nodes are similar to element nodes because you have to use the same JavaScript to

Related Documents

  • Improved Essays

    CPSC 558 — Adv Networking — Lab Assignment – Simple Data Link A1: Simple Data Link Introduction Build one data line between two nodes, that can send and receive a text string of ‘1’s and ‘0’s. We transmit the string "10010" in one direction and reply with the string "01101". Implementation Language: C++ (or C) Implementation Structure…

    • 888 Words
    • 4 Pages
    Improved Essays
  • Improved Essays

    Nt1330 Unit 3 Assignment 1

    • 1123 Words
    • 5 Pages

    Web server A web server processes requests using HTTP, the most basic network protocol used for information on the World Wide Web. HTML is the most frequent protocol for WWW and it may include images, scripts and style sheets in addition to text content. A user agent (eg. a browser) communicates by requesting a specific set of data using HTTP.…

    • 1123 Words
    • 5 Pages
    Improved Essays
  • Great Essays

    Nt1330 Unit 1 Assignment

    • 1292 Words
    • 6 Pages

    Nova Southeastern University Graduate School of Computer and Information Science Department of Management Information Systems MMIS 656 - Web Design Technologies Assignment # 1 Mohammed Aljaafari Exercise 1.1 Latest Versions Sources Browser Opera 27.0.1689.66 http://filehippo.com/ Web server Google Chrome 42.0.2292.0 Dev http://filehippo.com/ JavaScript JavaScript FH Plus http://en.softonic.com/ PHP PHP 5.6.5 http://php.net/downloads.php Servlets Java Servlet 3.0 http://www.oracle.com/ ASP.NET ASP.NET 5 http://www.asp.net/vnext…

    • 1292 Words
    • 6 Pages
    Great Essays
  • Decent Essays

    Nikyra Capson Wampum as Hypertext: An American Indian Intellectual Tradition of Multimedia Theory and Practice The wampum as hypertext is an interesting observation made by the author, and at first, I didn’t believe that it could completely meet the requirements. The definition of hypertext; is text which contains links to other text. I was confused on how belts could be considered fit into the definition, especially since they didn’t have any words and are mostly made up of patterns.…

    • 431 Words
    • 2 Pages
    Decent Essays
  • Improved Essays

    Nt1310 Unit 3 Assignment

    • 1244 Words
    • 5 Pages

    Semester A Unit 3 Lesson 8 Introduction and Objective You have learned about central idea but how do you determine exactly what the text is about? We know you can look at the title and headings. But what else? What is provided in the text?…

    • 1244 Words
    • 5 Pages
    Improved Essays
  • Improved Essays

    In stories, literary elements are used to help develop a theme or a main idea about the whole story in general. Theme, too, is considered a literary element. In each story, “The Most Dangerous Game,” “Ambush,” and “The Sniper,” each author uses conflict and characters to develop a theme. In the three short stories, “The Most Dangerous Game,” “The Sniper,” and “Ambush,” the authors each used literary elements throughout each story to help create a theme.…

    • 466 Words
    • 2 Pages
    Improved Essays
  • Improved Essays

    Web architecture: Web architecture is the technology which makes the web server run and enables the user to view websites and use the internet. Internet Service Providers (ISP) An ISP is a company that provides users with access to the internet. The users usually pay monthly for this service so that they can stay connected. Some of the main ISP’s in the UK are Plusnet, BT, Sky and Virgin Media.…

    • 1007 Words
    • 5 Pages
    Improved Essays
  • Great Essays

    Literary Analysis Collection 1 Characters, conflict, setting, and theme are examples of literary elements. In the stories of “The Trip,” “The Leap,” and “Contents of a Dead Mans Pocket.” The authors use these literary elements in a similar and different ways. Characters are any person, animal, or figure represented in any literary work.…

    • 1380 Words
    • 6 Pages
    Great Essays
  • Improved Essays

    “The Concept of A Discourse Community” by John Swales is to tell the reader the true definition of a discourse community and it characteristics and goes over the six requirements for it to be considered a true discourse community. He also goes over speech community versus discourse community and argues that they are truly different. In his argument he goes over many definitions of what a discourse community is, such as when Swales says it is “a union of people that have similar motives that communicate with one another in an attempt to accomplish something”(468). Swales also mentions “that discourse is a means of maintaining and extending the group's knowledge and of initiating new members into the group, and that discourse is epistemic…

    • 516 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    Joe Versus Black Robe

    • 779 Words
    • 4 Pages

    A close study of the technique Drew Haden Taylor, the central character of “Pretty Like a White Boy”, and Joe, the central character of “Legless Joe Versus Black Robe”, respond to their encounters with problems they face almost everyday and use humor to reduce the pain their problems is causing them. Though the authors of “Pretty Like a White Boy” as well as “Legless Joe Versus Black Robe” have creative ways of crafting their work, these two writers expressed their similarities of humor usage in their characters, style and plot between their stories. Why is humour usage in novels important? Firstly, Humor usage is effective in writing because it helps shape reader’s understanding of the reading. Secondly, humor helps writers to provide key background information, its easy for them to form a relationship and use mind-reading to communicate with their targeted audience.…

    • 779 Words
    • 4 Pages
    Improved Essays
  • Improved Essays

    Case For Reparations

    • 1111 Words
    • 5 Pages

    Ta-Nehisi Coates’s The Atlantic article “The Case for Reparations” forges an assertion on the controversial subject of slavery reparations. Accordingly, the evidence, structure, and thesis of the argument should uphold a level of both professionalism and pragmatism in supporting the argument. While Coates’ supports his arguments with facets from the physical, economic, social, and political aspects of injustice with according evidence, the lack of cohesiveness from the text weakens the aptitude of the argument. These factors noted in terms of structure, evidence, and failure in addressing counter claims.…

    • 1111 Words
    • 5 Pages
    Improved Essays
  • Improved Essays

    U.S. con living breathing document The constitution the oldest and most important document in american history. It is in control of our society today , makes laws, controls the people, our country. This document changes all the time because of people changing or things that happen. This document gives us our rights and can also take them away if needed.…

    • 1405 Words
    • 6 Pages
    Improved Essays
  • Improved Essays

    Literary elements help to make up a story; for this reason they are extremely important. The elements of literature, are the ground beneath the feet of a story. In The Book Thief, written by Markus Zusak, the literary element, man versus society, plays an extremely detrimental role in the story. Almost every character, goes through some form of man versus society conflict during the story. Some of the characters that are most affected by this are; Liesel, Max, Rudy, and Hans.…

    • 742 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    In this article I will be talking about organisational structures and I will create two organisational charts for two businesses (ASDA and Oxfam). Organisational chart: An organisational chart is a diagram that shows the structure of a business or organisation. Also sows the different departments and sectors in a business/organisation. They can organise the business as well.…

    • 712 Words
    • 3 Pages
    Improved Essays
  • Improved Essays

    1. Identify four distinct elements in this article that help readers assess its credibility. In each case, explain precisely how these elements do so. Within the article, some credible elements include, the publication, author, footnotes, and dates.…

    • 1659 Words
    • 7 Pages
    Improved Essays