jQuery * Selector Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The jQuery * selector selects all the elements in the document, including HTML, body, and head. If the * selector is used together with another element then it selects all child elements within the element used. Syntax: $("*")Parameters: *: This parameter is used to select all elements.Example 1: Selects all element and change background color. HTML <!DOCTYPE html> <html> <head> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("*").css("background-color", "lightgreen"); }); </script> </head> <body> <center> <h1>Welcome to geeksforgeeks</h1> <p>My name is akash.</p> <p>I live in mathura.</p> <p>My best friend is ajay.</p> <p>Who is your favourite:</p> <ul type="square"> <li>virat</li> <li>akshay</li> </ul> </center> </body> </html> Output: Example 2: Selects all element and change background color. HTML <!DOCTYPE html> <html> <head> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("*").css("background-color", "green"); }); </script> </head> <body> <h1>GeeksForGeeks</h1> <p>cricket is religion in india</p> <p>sachin is god of cricket.</p> <p>records:</p> <ul type="circle"> <li>100 centuries</li> <li>highest run scorer</li> </ul> </body> </html> Output: Comment More infoAdvertise with us J jeetesh16 Follow Improve Article Tags : Web Technologies JQuery jQuery-Selectors Explore jQuery Tutorial 8 min read Getting Started with jQuery 4 min read jQuery Introduction 7 min read jQuery Syntax 2 min read jQuery CDN 4 min read jQuery SelectorsJQuery Selectors 5 min read jQuery * Selector 1 min read jQuery #id Selector 1 min read jQuery .class Selector 1 min read jQuery EventsjQuery Events 4 min read jQuery bind() Method 2 min read jQuery blur() Method 1 min read jQuery change() Method 2 min read jQuery EffectsjQuery animate() Method 2 min read jQuery clearQueue() Method 2 min read jQuery delay() Method 2 min read jQuery HTML/CSSjQuery addClass() Method 2 min read jQuery after() Method 1 min read jQuery append() Method 2 min read jQuery TraversingjQuery | Traversing 4 min read jQuery add() method 1 min read jQuery addBack() Method 2 min read Like