Free Coding Ebook 👉 Get Now
Honestly, this method is considered a more professional way in web development. However, if you’re making a very simple project which you would like to complete in one file only, then use Method 1.
Okay, let’s see the code for this method.
And those were the 2 ways to link JS to HTML. Here’s a summary of what we saw.
1. Internal: <script>//your code here</script>
2. External: <script src=”fine-name.js”></script>
comment down below any doubts or suggestions you have. I hope this post was useful and thanks to Code With Random for giving me the chance to write here I hope to see you all in future posts. Goodbye!
Written by – CodingPorium