HTML Include JavaScript Code in HTML Directly including JavaScript code


Example

Instead of linking to an external file, you can also include the JS code as-is in your HTML:

<script>
// JavaScript code
</script>