How do you add jQuery to a web page?

Use a script tag, before your own code:

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="js/app.js"></script>

Other ways: download the file and use a local path, or install with npm install jquery. To check that it works, type $.fn.jquery in the browser console. See jQuery Get Started.


Learn more about the similar topics:
Tutorials
No Content Found.
Exercises & Assignments
No Content Found.
Interview Questions & Answers
No Content Found.