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 () { $('#myDiv').append(" - This element id is myDiv"); $('#myPtag').append(" - This element id is myPtag"); }); </script> </head> <body> <h1>CSS Selector: #id</h1> <div id="myDiv"> Div Tag </div> <p id="myPtag"> p Tag </p> </body> </html>
Result: