0
Script tag problem in javascript
why we started script tag like <script language="javascript" type="text/javascript"> why we use language="javascript" and why we use type="text/javascript"
3 ответов
+ 4
@Thomas John is right: since Html5 (and related <!DOCTYPE html> specified at start of your document), you can shortand the <script> tag by providing none attributes (wich are implicitly necessarly 'javascript' and 'text/javascript')...
+ 2
The 'language="javascript"' attribute is no longer needed with the current web standard as JavaScript is the default language for the script tag. I am unsure the use of 'type="text/javascript"' however...
+ 1
In HTML 5 external js files can be accessed through-
<script src="myscripts.js"></script>