Hey friends, today I’ll explain all you need to know to start link JS to HTML. Before we dive in, I’ll introduce myself. I’m CodingPorium and I make coding tutorials and provide Free Source Code. I’m a newbie to YouTube, but I have experience in front-end web development for over 3 years. Do check out my YouTube channel here or by searching for CodingPorium on YouTube for more!
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>