The correct way to code for a js source?

In html5 you just need this to be valid:

<script  src="path/to/file.js"></script>

The type=“text/javascript” attribute/value was required for validation prior to html5 but has always been unnecessary as browsers know exactly what to do with a script. These days you should omit it and save on code.:slight_smile:

4 Likes