From the course: D3.js Essential Training
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Understanding the DOM and console - D3.js Tutorial
From the course: D3.js Essential Training
Understanding the DOM and console
- [Instructor] Before you start coding in D3, you need to know how to use the DOM, the Document Object Model. The DOM has nothing to do with D3 specifically. It's actually part of how browsers understand and interact with HTML pages. You can think of it like a live map of your webpage. Now, I just pressed F12 there, and F12 works in any browser software to open a sort of developer panel. And these panels can look a little bit different to each other, but they all have certain things in common. They all have a a JavaScript console, which enables you to post messages and data and debug from your file, from your code editor, into your browser. And we'll check that out in a second. We've already used it, in fact, to see D3.version. And the other thing, this one's called elements. It may be called different things depending which browser you are using. You can think of it like a live map of your webpage. So every block you add, every element tag or piece of content is represented in this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.