Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Greg Schudel
Greg Schudel
4,090 Points

In JS, difference between node? element? and the DOM?

I know what the Dom is, and even can manipulate it using JS. I just want more clarity on what the difference between these are. I plan on moving into the React.js soon and I want to be clear because I hear discussion of the node alot in React.js.

1 Answer

Steven Parker
Steven Parker
225,652 Points

The DOM is an organizational structure composed of nodes. A node can be an element, an attribute, a text component, or any of several other types. Elements are generally of the most interest when manipulating HTML.

For complete details of node types, see the DOM specification.