Selects a single HTML element based on the provided CSS selector.
const header = el('header');if (header) console.log('Header element found:', header); Copy
const header = el('header');if (header) console.log('Header element found:', header);
A string containing one or more CSS selectors to match.
The first HTML element that matches the specified selector, or null if no matches are found.
null
Selects a single HTML element based on the provided CSS selector.
Example