Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8947231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:42:16+00:00 2026-06-15T12:42:16+00:00

How do you properly link a JavaScript file to a HTML document? Secondly, how

  • 0

How do you properly link a JavaScript file to a HTML document?

Secondly, how do you use jQuery within a JavaScript file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:42:17+00:00Added an answer on June 15, 2026 at 12:42 pm

    First you need to download the jQuery library from https://jquery.com/ then load the jQuery library the following way within your HTML head tags.

    Then you can test whether jQuery is working by adding your jQuery code after the jQuery loading script.

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    
    <!--LINK JQUERY-->
    <script type="text/javascript" src="jquery-3.3.1.js"></script>
    <!--PERSONAL SCRIPT JavaScript-->
    <script type="text/javascript">
       $(function(){
          alert("My First jQuery Test");
       });
    </script>
    
    </head>
    <body><!-- Your web page --></body>
    </html>
    

    If you want to use your jQuery scripts file separately, you must define the external .js file this way after the jQuery library loading.

    <script type="text/javascript" src="jquery-3.3.1.js"></script>
    <script src="js/YourExternalJQueryScripts.js"></script>
    

    Test in real time

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    
    <!--LINK JQUERY-->
    <script type="text/javascript" src="jquery-3.3.1.js"></script>
    <!--PERSONAL SCRIPT JavaScript-->
    <script type="text/javascript">
       $(function(){
          alert("My First jQuery Test");
       });
    </script>
    
    </head>
    <body><!-- Your web page --></body>
    </html>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple html file. Using javascript I am opening a https link
How do I open a new window in javascript properly? I've tried: <a href='javascript:window.open(testing.html,mywindow,menubar=0,resizable=1,width=200,height=500,left=0,top=0);'
I am using JavaScript to specify the target link. It is not working properly.
I need to know how to use JavaScript to find out from which file
when I run my javascript in my index.html it works properly but I wanted
I have the following Javascript/jQuery on my page: <script> $(#mymarkdown).load(./LPInfo.md); var md = markdown.toHTML($(#mymarkdown).html());
I can't link properly to glew. I have done: #define GLEW_STATIC #include glew/glew.h #pragma
I embed a video in html page with swf file. that is running on
so if there is an external css file like: <link rel='stylesheet' type='text/css' href='test.css'> and
I have .js Javascript file, inside which I reference CSS classes defined in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.