ExampleSelect all elements inside <body>:
Try it yourself » |
The * selector selects every single element in the document, including html, head and body.
If used together with another element (nested selectors, like in the example above), it selects all child elements within the specified element.
$("*") |
Tip: Depending on use, the * can be slow, and heavy for some browsers to process.
![]() |
Try it Yourself - Examples |
Select all
elements
Use the * selector to select all elements in a document.