There are different ways to include jQuery in our project. One method is very simple and it is by using the CDN link in our project. The other is by downloading the file and then using it in the project. We can use the jQuery link anywhere whether in the head or body. Just make sure that it should be above the jQuery code that you will write. In our topics, we will use the CDN link of jQuery. The best practice for writing jQuery code is:-
// jQuery code goes here
The $ accesses jQuery.
The (selector) finds HTML elements.
The action() is then performed on the element(s).