Questions And Answers

More Tutorials

Jquery Include script tag in head of HTML page

To load jQuery from the official CDN, go to the jQuery website. You'll see a list of different versions and formats available.
The best practice is to load any external JavaScript libraries at the head tag with the async attribute. Here is a demonstration:

<!DOCTYPE html>
 <title>Loading jquery-2.2.4</title>
 <script src="" async></script>
 <p>This page is loaded with jquery.</p>

When using async attribute be conscious as the javascript libraries are then asynchronously loaded and executed as soon as available. If two libraries are included where second library is dependent on the first library is this case if second library is loaded and executed before first library then it may throw an error and application may break.


In this page (written and validated by ) you learned about Jquery Include script tag in head of HTML page . What's Next? If you are interested in completing Jquery tutorial, your next topic will be learning about: Jquery Object.

Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue:

Share On:

Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using, you agree to have read and accepted our terms of use, cookies and privacy policy.