<button onclick="alert('Hello')">
Click Me
</button>
Inline JS is written directly inside an HTML tag using **event attributes** (like onclick). It is useful for very small actions but hard to manage for larger projects.
<script>
console.log("Hello from Internal JS");
// DOM Manipulation Example
document.getElementById("title").innerText
= "Hello JavaScript";
</script>
Internal JS is placed inside the <script> tag, usually at the bottom of the <body>. It keeps logic within the same file as the HTML.
File: script.js
console.log("External JS Loaded");
File: index.html
<script src="script.js"></script>
This is the **Professional Industry Standard**. You write JS in a separate .js file and link it to your HTML. This makes the code reusable and keeps the project organized.