Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.
Well done!
You have completed (UPI) Chapter 9: Understanding the Document Object Model (DOM) with JavaScript!
Instruction
Using a Query Selector
The shown locating methods use specialized semantics to locate elements. But there is also a general method that combines all of thatβplus more.
Query selectors use a complex syntax consisting of HTML element ids, HTML element names, HTML attributes, CSS classes, positions, and more. They locate single elements or a list of elements. To retrieve the first element that satisfies the selector,...