document.querySelector('p') will select the _________

element in the HTML document.

  • first
  • last
  • random
  • first matching
document.querySelector('p') will select the first

element in the HTML document that matches the selector. If multiple

elements exist, it selects the first one it encounters in the document's order.

Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *