The querySelector() method returns the first element within the document that matches the specified CSS selector.
Description
public ElementNode::querySelector(string $selector): ?ElementInterface
Parameters
selector
The CSS selector string to match the element(s) against.
Return Value
Returns the first ElementInterface that matches the selector, or null if no matching element is found.
Exceptions
None