to include JavaScript we use <script> ......</script> tag. but somewhere I read that <script type="text/JavaScript">.....</script> is used....can anybody explain what's the difference | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

to include JavaScript we use <script> ......</script> tag. but somewhere I read that <script type="text/JavaScript">.....</script> is used....can anybody explain what's the difference

20th Aug 2016, 3:59 PM
Anoop poonia
Anoop poonia - avatar
2 Answers
+ 2
The type is js by default in html5, which is supported by all major browsers. Still, you should precise the type anyway just in case someone is using an outdated browser.
20th Aug 2016, 4:35 PM
Zen
Zen - avatar
0
if you want to put the type ypu can put it whete you want, but it is not necessary.
21st Aug 2016, 5:11 AM
alvaro sanchez camelo
alvaro sanchez camelo - avatar