Home
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function () { $('div#myDiv1').append(" - This element id is myDiv1"); $('div#myDiv2').append(" - This element id is myDiv2"); }); </script> </head> <body> <h1>CSS Selector: element#id </h1> <div id="myDiv1"> Div Tag </div> <div id="myDiv2"> Div Tag </div> </body> </html>
Result: