Which tag is used to implement javascript in an HTML file?

JavaScript

1 answer

Answer

1148256

2026-05-02 09:15

+ Follow

JavaScript
JavaScript

The SCRIPT tag is used to implement a JavaScript (or other kind, i.e. VBScript) in an HTML document.

The tag can either contain the actual JavaScript code, or can point to an external script file that should be included at render-time.

To add JavaScript directly to the document in HTML 5, place these tags in either the HEAD section or just prior to the BODY sections closing tag.

<script type="text/JavaScript">

//JS code goes here

</script>

To call an external JavaScript file, use the "src" attribute, like so:

<script type="text/JavaScript" src="path/to/script.js"></script>

If you're unsure of where to put the JavaScript tags, see the related answer(s).

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.