xFactorSchool.com(Beta)
How to Do Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Editor
C Code Editor
C++ Code Editor
C# Code Editor
Java Code Editor
Python Code Editor
HTML Code Editor
CSS Code Editor
JavaScript Code Editor
Practice how to link JavaScript file to an html page
JavaScript Online Editor
Run Code
More JavaScript Sample Codes
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Link JavaScript File to HTML Page</title> <!-- Create a link to your JavaScript file specifying src="" attribute of HTML script tag --> <script src="/mySampleScript.js"></script> <!-- src="/mySampleScript.js" specifies JavaScript file path --> </head> <body> <h1>How to link javascript file to an html page?</h1> <button onclick="myFunction()">Click here to see the power of Javascript</button> <p id="myParagraph"></p> </body> </html>