All you need to do is include a <script> tag in your HTML file that references the jQuery file on a CDN. Here's an example using Google's CDN:
<!-- Load jQuery from Google's CDN -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
Or use Cloudflare or Microsoft's CDN for example:
<!-- Load jQuery from Cloudflare CDN -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
Advantages of Using a CDN for jQuery
Faster page load times: A CDN distributes content from servers in multiple regions around the world. What this means is users get to download jQuery from a server much closer to them, thus resulting in faster page load times.
Caching: CDNs cache static files. If the user has already visited a site using the same version of jQuery from a CDN, the browser can serve the cached version, avoiding an additional network request and speeding up the page load time.
Reliability: CDNs are optimized for high availability and reliability. They offer redundancy in case of server failures, ensuring the jQuery file is always available.