Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

querySelector

Description

The querySelector of ParentNode for JS returns the first element of the node that matches the selector(s).

Syntax

node.querySelector(selectors)

Parameters

selectors

Patterns that match elements in a tree structure.

Examples

1 · syntax

2 · element

3 · element pseudo-class

4 · class

5 · class pseudo-class

6 · id

7 · id element

8 · id element pseudo-class

9 · id class

10 · id class pseudo-class

append

children

firstElementChild

lastElementChild

prepend

querySelectorAll

replaceChildren

Web Hypertext Application Technology Working Group (WHATWG)

HomeMenu