The correct way to code for a js source?

These are Crockford’s recommendations if it helps.

type=“text/javascript”

This attribute is optional. Since Netscape 2, the default programming language in all browsers has been JavaScript. In XHTML, this attribute is required and unnecessary. In HTML, it is better to leave it out. The browser knows what to do.

1 Like