The DOM: What's the Document Object Model?
The DOM: What's the Document Object Model?
The DOM is the browser's internal, progrematic representation of a webpage. Languages like javascript allow you to modify the DOM, and thus the website without editing the HTML of the page.
Technically, the DOM is an API (application programming interface). There are many types of APIs, but this particular API interacts with XML and HTML documents. It's in charge of how those documents are accessed and manipulated.
Really, you can do a lot with the dom, and if you're already scripting in JS and jQuery, you're already doing it.
You can insert new things, elements, or alter style or content for elements that already exist.
This can be done with pure javascript, like:
document.getElementById(id)
element.getElementsByTagName(name)
document.createElement(name)
You can also use libraries like jQuery to simplify, standardize and automate manipulating the DOM, like:
$('#box2').append("This will be added to box2!")
Other Videos By freeCodeCamp.org
2016-09-23 | Networks: What is a WAN? |
2016-09-23 | Networks: What is a Mac Address? |
2016-09-23 | Networks: Collision Detection and Avoidance |
2016-06-23 | Deploy a Dynamic Website in Minutes |
2016-06-23 | Gmail Keyboard Shortcuts |
2016-03-27 | Web Design: Development vs Design |
2016-03-27 | Computer Basics: What does 'Open Source' mean? |
2015-09-23 | Computer Security Tips for Beginners |
2015-09-22 | FCC Computer Basics 11: IP Addresses |
2015-09-20 | Computer Basics 14: Content Delivery Networks |
2015-09-20 | The DOM: What's the Document Object Model? |
2015-09-20 | Big O Notation: A Few Examples |
2015-09-20 | The DOM: Style in the Header, Script in the Footer |
2015-09-20 | Big O Notation: What It Is and Why You Should Care |
2015-08-24 | Chrome Dev Tools: Summary Tab |
2015-08-24 | Chrome Dev Tools: Console Tab |
2015-08-24 | Chrome Dev Tools: Audits Tab |
2015-08-24 | Chrome Dev Tools: Resources Tab |
2015-08-24 | Chrome Dev Tools: Memory Tab |
2015-08-24 | Chrome Dev Tools: Timeline Tab |
2015-08-24 | Chrome Dev Tools: Sources Tab |