Tip: Use the getAttributeNode() method if you want to return the attribute … .querySelector() will only return the first match… You might also check the console for errors, it’s the panel right next to the DOM inspector in dev tools. [2015-04-29 08:08:05] ], [ https://stackoverflow.com/questions/29937768/document-queryselector-multiple-data-attributes-in-one-element ], [+101] By using the querySelector(“a”).style.backgroundColor = “red”; we have passed the anchor tag (“a”) to the querySelector. [2015-04-29 08:08:05] The querySelector is a JavaScript method that plays a vital role in the searching of elements. Test runner. jQuery simplified the process of selecting one or more elements and applying changes to all of them at the same time. All rights reserved. Required. I see support for wildcards in attribute queries but not for the elements themselves. The HTMLOptionElement represents the