How Tutorial
how-give-multiple-class-html-elementUse CSS With HTMLhow-to-make-link-in-page-in-htmlHow-Link-css-file-to-Html-fileHow-To-Make-Div-Align-CenterHow-to-create-html-button-colorfulhow-to-add-css-file-in-htmlhow-to-use-javascript-in-htmlJavaScript Sorting Multidimensional ArrayHow To Link CSS To HTMLHow To Remove Scroll bar in CSSDSA Full FormHow Long Does It take to learn JavaScriptThere are two best working method to use script file
1 - if you have external javascript file then you link JS file in the head by script tag
Or Before the end of body tag by script tag it work properly in both case
Example 01
<!---*********** This is index.html file ********---->
<DOCTYPE html>
<head>
<title> how use script file </title>
<!--************** attached external js file( index.js ) in head section ****************/
<script src="index.js"> </script>
</head>
<body>
<p> Hey script tag working in both case </p>
<!--- ******you can also include external js file here*******--->
</body>
</html>
2 - If you have not external js file then you should write script before the end of body
Example 02
<body>
<p> use script in same file </p>
<script>
alert(" you can script code in here its working fine ");
</script>
</body>