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! While you're at it, check out some resources Treehouse students have shared here.
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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Samuel Kleos](https://uploads.teamtreehouse.com/production/profile-photos/11699126/micro_Square_Photo_-_Tahir.jpg)
Samuel Kleos
Front End Web Development Techdegree Student 13,118 Points.getElementsByTagName() vs .querySelectorAll()
In practical terms, if I append an item to a new Nodelist that I want to store somewhere else on the page, what is the benefit of having a live node item, vs a static one?
Ie.
Live Node Item: document.getElementsByTagName('li')[0]
vs
Static Node Item: document.querySelectorAll('li:nth-child(1)')
Also is there a difference if I add event listeners to array items by looping over an HTML Collection vs Static Nodelist?
1 Answer
![Travis Alstrand](https://uploads.teamtreehouse.com/production/profile-photos/11694118/micro_travisbadge2.jpg)
Travis Alstrand
Treehouse TeacherHey there Samuel Kleos !
I was getting ready to type out a big response but I found these two pages which honestly explain the differences much better than I ever could
They're both easy reads and shared more info than I was able to think of as well. I hope these shed new light!