+ 3

Why the language attribute is deprecated, and should not be used in Java script?

18th Mar 2018, 9:31 AM
Ujjwal Kumar
Ujjwal Kumar - avatar
4 odpowiedzi
+ 5
If you're talking about the 'language' html attribute of the <script> tag, the reason is: << Like the type attribute, this attribute identifies the scripting language in use. Unlike the type attribute, however, this attribute’s possible values were never standardized. The type attribute should be used instead. >> https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
18th Mar 2018, 10:24 AM
visph
visph - avatar
+ 3
@Bill Zelenko wrote: << In HTML5 do not use the type="text/javascript" >> In Html5 you can still use the 'type' attribute of the <script> tag, but it's no more mandatory ( as JS is actually still the only script language, last html specifications have decided to have "text/javascript" as default value for 'type' attribute if not specified ;) )
18th Mar 2018, 12:17 PM
visph
visph - avatar
+ 2
In HTML5 do not use the type="text/javascript"
18th Mar 2018, 12:07 PM
Bill Zelenko
Bill Zelenko - avatar
+ 2
never be sorry for asking... mistakes are deep by those who assume or choose to not ask and can cost companies thousands.
19th Mar 2018, 3:11 AM
BroFar
BroFar - avatar