Find DOM elements from the console

Help us make DevTools Tips better! Fill out this survey to tell us more about your DevTools habits and frustrations.

Categories: Supported by:

Find DOM elements from the console

$ and $$ are 2 functions you can use in the console to find elements in the page.

They are essentially shortcuts to the longer document.querySelector() and document.querySelectorAll() functions, but $$ returns an array instead of a NodeList.

They're nice and short, and for those who worked with jQuery, they will feel familiar.

Firefox's console panel, showing 3 different examples of using the $ and $$ built-in console functions.

See also