+ Reply to Thread
Results 1 to 6 of 6

Thread: How do you add JavaScript to HTML?

  1. #1
    Join Date
    Nov 2019
    Location
    Jaipur
    Posts
    13

    How do you add JavaScript to HTML?


  2. #2
    Join Date
    Dec 2019
    Location
    CHENNAI
    Posts
    757
    To include an external JavaScript file, we can use the script tag with the attribute src . You've already used the src attribute when using images. The value for the src attribute should be the path to your JavaScript file. This script tag should be included between the <head> tags in your HTML document.

  3. #3
    Join Date
    Oct 2019
    Location
    pakistan
    Posts
    536

  4. #4
    Join Date
    Jul 2019
    Location
    pakistan
    Posts
    148

  5. #5
    Join Date
    Dec 2019
    Location
    chennai
    Posts
    507
    You can add JavaScript code in an HTML document by employing the dedicated HTML tag <script> that wraps around JavaScript code. The <script> tag can be placed in the <head> section of your HTML, in the <body> section, or after the </body> close tag, depending on when you want the JavaScript to load

  6. #6
    Join Date
    Jan 2020
    Location
    chennai
    Posts
    614
    You can add JavaScript code in an HTML document by employing the dedicated HTML tag <script> that wraps around JavaScript code. The <script> tag can be placed in the <head> section of your HTML, in the <body> section, or after the </body> close tag, depending on when you want the JavaScript to load.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts