Back to lesson
1. What is a node list?
Specific HTML tags
A list of all the HTML tags of a specific type, e.g. all p tags
2. How can we determine how many nodes of a certain type are in a node list?
Loop through the node list and set up a counter
There's no way to do this programmatically
Use document.getElementsByTagName to add all nodes of a certain type into a variable and then call .length on that variable
3. How can we print out all the nodes in a list to the screen?
Do it manually
Use document.getElementsByTagName to add nodes into a variable and then loop through the variable
With a loop
Back to the top
© 2017 GoSkills Ltd.
Skills for career advancement