Skip to content
How to use <script> tag
There are different way available how the script tag can be used in the HTML file.
The SCRIPT tag usually added to the header section of the HTML file.
The below screen shots are taken from Visual Studio.
The typical HTML file structure.
Take the path of the HTML file and put in the address bar of the Chrome/IE. The output is shown as below:
The <SCRIPT> tag can be added to the HEADER section of the HTML file.
Here “document” is the object. When a HTML document is loaded into the window it becomes a document object that contains the content of the page.
Add the PATH of the external .JS file in the Script tag of the HTML file.
Execute and check O/P-
<span>%d</span> bloggers like this: