Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
- Get and Set Content with textContent and innerHTML 8:00
- Change Element Attributes 5:50
- Modifying Elements 2 objectives
- Set Inline Styles with the style Property 9:38
- Create New DOM Elements 4:35
- Review Attributes and Element Creation 5 questions
- Append Nodes 4:52
- DOM Manipulation Review 3 questions
- Insert HTML at Specified Positions 3:39
- Remove Nodes 4:20
- Review Appending and Removing Nodes 5 questions

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
A user might want to remove certain elements from the page in a browser-based app, like an item from a TODO list once completed. These actions require that we provide a way to remove a node from the DOM – like the node representing that list item or image element, for instance. One way to achieve this is with the remove()
method.
Further Reading
Interacting with the DOM – Treehouse course
One of the strengths of JavaScript is its ability to handle user interaction. In this follow-up course, you will learn how to use JavaScript to listen for different events (or user actions) and make changes to the DOM when they occur. In addition, you'll learn how to get around (or traverse) the DOM.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up-
lythila
2,958 PointsOne step further - hiding the remove button when there are no more items
Posted by lythilalythila
2,958 Points2 Answers
-
Samuel Kleos
Front End Web Development Techdegree Student 13,728 Points1 Answer
-
Kade Rathbun
6,586 Points1 Answer
-
Ben McMahan
7,922 Points1 Answer
View all discussions for this video
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up