Salesqueen Software Solution

Download Free Estimation Now Click Here
Notifications
Clear all

What is the correct way to include JavaScript into your HTML?

3 Posts
3 Users
0 Reactions
101 Views
Posts: 461
Topic starter
(@dinesha-g)
Reputable Member
Joined: 2 years ago

correct way to include JavaScript into HTML

2 Replies
Posts: 52
(@chitravarsha15)
Trusted Member
Joined: 2 years ago

By using the specific HTML element script that wraps around JavaScript code, JavaScript code can be added to an HTML document.Depending on when you want the JavaScript to load, the script tag can be added to either the head or the body portion of your HTML.

 

 

 

Reply
Posts: 173
(@princy)
Estimable Member
Joined: 2 years ago

The script tag with the attribute src can be used to include an external JavaScript file. When employing images, you have already used the src attribute. The path to your JavaScript file should be the value for the src attribute. Between the head tags in your HTML content, place this script tag

Reply
Share: