{"id":7483,"date":"2021-08-06T11:48:02","date_gmt":"2021-08-06T11:48:02","guid":{"rendered":"https:\/\/www.scmgalaxy.com\/tutorials\/?p=7483"},"modified":"2022-04-13T16:30:46","modified_gmt":"2022-04-13T16:30:46","slug":"what-is-the-use-of-the-document-object-model-in-javascript","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/","title":{"rendered":"What is the use of the document object model in JavaScript?"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Document Object Model<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>The Document Object Model (DOM) is an Application Programming Interface (API) for HTML and XML documents.<\/li><li>With the Document Object Model, programmers can create and build documents, navigate their structure, and add, modify, or delete elements and content.<\/li><li>The DOM is an object-oriented representation of the web page, which can be modified with a scripting language such as JavaScript.<\/li><li>The DOM model represents a document with a logical tree.<\/li><li>According to Document Object Model (DOM), every HTML-tag is an object. Nested tags are called \u201cchildren\u201d of the enclosing one. All operations on the DOM start with the document object. From it, we can access any node.<\/li><li>The Document Object Model can be used with any programming language.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>DOM Levels<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM Level 0 \u2013 This level supports the common document object collections \u2013 form[ ], image[ ], anchors[ ], links[ ] and applets[ ]. This is also known as classic or traditional JavaScript Object Model. \u2022 <\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM Level 1- It provides the ability to manipulate all elements in a document through a common set of functions. In this level, all elements are exposed and parts of the page can be read and written to at all times. <\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li> DOM Level 2 \u2013 It provides further access to page elements primarily related to CSS and focuses on combining Level 0 and Level 1 while adding improved support for working with XML documents.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>DOM Levels<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM Level 3 \u2013 Enhanced Level of Level 1 and Level 2 and added support for XPath and keyboard event handling.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM Level 4 \u2013 Enhanced\u00a0 year 2015<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Categories of DOM<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM Core \u2013 It specifies a generic model for viewing and manipulating a marked-up document as a tree structure.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM HTML \u2013 It specifies an extension to the core DOM for use with HTML. This represents DOM Level 0 with capabilities for manipulating all of the HTML element objects.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM CSS \u2013 It specifies the interfaces necessary to manipulate CSS rules programmatically.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM Events \u2013 It adds event handling to the DOM.<\/li><\/ul>\n\n\n\n<ul class=\"wp-block-list\"><li>DOM XML \u2013 It specifies an extension to the Core Dom for use with XML.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Document Tree<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png\" alt=\"\" class=\"wp-image-7485\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree-300x150.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"558\" height=\"348\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree-code.png\" alt=\"\" class=\"wp-image-7486\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree-code.png 558w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree-code-300x187.png 300w\" sizes=\"auto, (max-width: 558px) 100vw, 558px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>DOM Node Types<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Constant<\/strong><\/td><td class=\"has-text-align-center\" data-align=\"center\"><strong>Node Type<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>Node.ELEMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">1<\/td><td>An element such as &lt;h1> or &lt;div><\/td><\/tr><tr><td>Node.TEXT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">3<\/td><td>The actual Text of Element or Attribute ex: &#8211; \u201cHello\u201d<\/td><\/tr><tr><td>Node.PROCESSING_INSTRUCTION_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">7<\/td><td>An instruction to a parser on aspect of the document &lt;?xml version=\u201c1.0\u201d?><\/td><\/tr><tr><td>Node.COMMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">8<\/td><td>A comment such as &lt; &#8211; &#8211; Something &#8211; &#8211; ><\/td><\/tr><tr><td>Node.DOCUMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">9<\/td><td>A Document Node<\/td><\/tr><tr><td>Node.DOCUMENT_TYPE_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">10<\/td><td>A doctype statement &lt;!DOCTYPE html><\/td><\/tr><tr><td>Node.DOCUMENT_FRAGMENT_NODE<\/td><td class=\"has-text-align-center\" data-align=\"center\">11<\/td><td>A document fragment, which represents a lightweight structure to hold a collection of DOM nodes for manipulation or insertion.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Node Relationship<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Parent<\/strong><\/li><li><strong>Children<\/strong><\/li><li><strong>First Child<\/strong><\/li><li><strong>Previous Sibling<\/strong><\/li><li><strong>Next Sibling<\/strong><\/li><li><strong>Last child<\/strong><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>DOM Node Properties<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td class=\"has-text-align-center\" data-align=\"center\"><strong>Properties<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">nodeName<\/td><td>Contains the name of the node<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">nodeValue<\/td><td>Contains the value within the node; generally only applicable to text nodes<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">nodeType<\/td><td>Holds a number corresponding to the type of node<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">parentNode<\/td><td>Reference to the parent node of the element, if one exists<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">childNodes<\/td><td>Access to the list of child nodes<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">firstChild<\/td><td>Reference to the first child node of the element, if one exists<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">lastChild<\/td><td>Points to the last child node of the element, if one exists<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">previousSibling<\/td><td>Reference to the previous sibling of the node; for example, if its parent node has multiple children<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">nextSibling<\/td><td>Reference to the next sibling of the node; for example, if its parent node has multiple children<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">attributes<\/td><td>The list of the attributes for the element<\/td><\/tr><tr><td class=\"has-text-align-center\" data-align=\"center\">ownerDocument<\/td><td>Points to the HTML Document object in which the element is contained<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Document Object Model The Document Object Model (DOM) is an Application Programming Interface (API) for HTML and XML documents. With [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[16],"tags":[5999,5095,1543,6000],"class_list":["post-7483","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-document-object","tag-javascript","tag-node","tag-node-relationship"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What is the use of the document object model in JavaScript? - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the use of the document object model in JavaScript? - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"Document Object Model The Document Object Model (DOM) is an Application Programming Interface (API) for HTML and XML documents. With [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-06T11:48:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-04-13T16:30:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png\" \/>\n<meta name=\"author\" content=\"rajeshkumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rajeshkumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/\"},\"author\":{\"name\":\"rajeshkumar\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"headline\":\"What is the use of the document object model in JavaScript?\",\"datePublished\":\"2021-08-06T11:48:02+00:00\",\"dateModified\":\"2022-04-13T16:30:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/\"},\"wordCount\":591,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/document-tree.png\",\"keywords\":[\"document object\",\"Javascript\",\"Node\",\"Node Relationship\"],\"articleSection\":[\"JavaScript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/\",\"name\":\"What is the use of the document object model in JavaScript? - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/document-tree.png\",\"datePublished\":\"2021-08-06T11:48:02+00:00\",\"dateModified\":\"2022-04-13T16:30:46+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/document-tree.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2021\\\/08\\\/document-tree.png\",\"width\":600,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/what-is-the-use-of-the-document-object-model-in-javascript\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is the use of the document object model in JavaScript?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/a40e0dd38feee7c2779460a804d49361\",\"name\":\"rajeshkumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g\",\"caption\":\"rajeshkumar\"},\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/rajeshkumar\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is the use of the document object model in JavaScript? - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/","og_locale":"en_US","og_type":"article","og_title":"What is the use of the document object model in JavaScript? - scmGalaxy","og_description":"Document Object Model The Document Object Model (DOM) is an Application Programming Interface (API) for HTML and XML documents. With [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/","og_site_name":"scmGalaxy","article_published_time":"2021-08-06T11:48:02+00:00","article_modified_time":"2022-04-13T16:30:46+00:00","og_image":[{"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png","type":"","width":"","height":""}],"author":"rajeshkumar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rajeshkumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/"},"author":{"name":"rajeshkumar","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"headline":"What is the use of the document object model in JavaScript?","datePublished":"2021-08-06T11:48:02+00:00","dateModified":"2022-04-13T16:30:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/"},"wordCount":591,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png","keywords":["document object","Javascript","Node","Node Relationship"],"articleSection":["JavaScript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/","name":"What is the use of the document object model in JavaScript? - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png","datePublished":"2021-08-06T11:48:02+00:00","dateModified":"2022-04-13T16:30:46+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2021\/08\/document-tree.png","width":600,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/what-is-the-use-of-the-document-object-model-in-javascript\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"What is the use of the document object model in JavaScript?"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/a40e0dd38feee7c2779460a804d49361","name":"rajeshkumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/82337e1fc8642c7f36795aa0775af055a4f38882994004b593efd31758d4434e?s=96&d=mm&r=g","caption":"rajeshkumar"},"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/rajeshkumar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=7483"}],"version-history":[{"count":1,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7483\/revisions"}],"predecessor-version":[{"id":7488,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/7483\/revisions\/7488"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=7483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=7483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=7483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}