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"

25th Jul 2017, 3:49 PM
Ankit Saini
Ankit Saini - avatar
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')...
26th Jul 2017, 8:40 AM
visph
visph - avatar
+ 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...
25th Jul 2017, 3:55 PM
Thomas John
Thomas John - avatar
+ 1
In HTML 5 external js files can be accessed through- <script src="myscripts.js"></script>
25th Jul 2017, 4:18 PM
Apoorva Shenoy Nayak
Apoorva Shenoy Nayak - avatar