HTML <script> src Attribute
Example
<script src="demo.js"></script>
Meaning
The src attribute specifies the URL of a file containing scripting code.
The URI of an external script; this can be used as an alternative to embedding a script directly within a document.
Most of the times files containing JavaScript code will have a .js extension, and a server will attach the appropriate MIME type; if not, the type attribute might be used to explicitly set the content type of the external script file.
Standard Syntax
<script src="URL"></script>
Advertisement
Attribute Values
| Value | Description |
|---|---|
| URL | Value can be
|