Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

How to connect JS with our HTML document?

 

There are 3 ways to include a JS script to your webpage. Inline, internal and external. Let's take a look at each,and see how.

1. Inline JavaScript. Include different javascript code for every html element. Highly inefficient and not recommended. Wasted performance. Direct connection though.

Take notice that you must have placed an external script to the head of your HTML file (see external js for that).