Seven distinct working examples of different DOM methods.
Click the add listener button to have a function invoked by the press of the 'b' and/or 'w' key. 'b' will turn the document body dark with light font, and 'w' will revert back to normal. Click the remove listener button to no longer invoke the function when pressing the 'b' or 'w' keys.
In the unordered list at the top of the page I gave all of the list items classes that are relevant to the sort of grouping/type of method. I will be using those classes in this example.
Select a class from the drop down, and then choose to view the results of either using querySelector() or querySelectorAll() by pressing the corresponding button.
Test Element