The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Where does the HTML link to the JS file? Reply To: Where does the HTML link to the JS file?



If you need information on how to link example.js file in your HTML. Take a look at html5boilerplate index page. If you are confused about anything in that file, let us know.

I was looking…on codepen and couldn’t figure out where in the HTML, the js is called in.

CodePen is a sophisticated system that lets you type in code and preview it live. What you enter in those 3 boxes is essentially taken into the system and injected into the preview. If you inspect the preview you’ll see styles and scripts. In the example pen you linked to, all the code is actually in the JS box. Nothing extra is linked up. You can see this by clicking on the little gear circle for settings. Each box has it’s own (HTML, CSS, JS). Now the code is just minified version of, which is a feature detection tool. Non of the animations are actually running from this JS file.

I’ve forked a version without JS here. If you look at the settings again, you’ll see Modernizr checked off, and that’s it. All animation is CSS.