By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,716 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,716 IT Pros & Developers. It's quick & easy.

Should I use script language attribute or script type?

vikas251074
100+
P: 198
Hello everybody,
Should I use script language attribute or script type? Is there any difference? Until now I have used script language attribute in my all programme where javascript has to be used.

Thanks and regards,
Vikas
Jun 4 '08 #1
Share this Question
Share on Google+
4 Replies


gits
Expert Mod 5K+
P: 5,390
use the type attribute, the language attribute is deprecated ... have a look here ... and using it could cause the page to fail HTML-validation with some doctypes ...

kind regards
Jun 4 '08 #2

rnd me
Expert 100+
P: 427
the default language for virtually all browsers is javascript. neither attribute is needed, unless you are mixing scripting languages on a single page. the type attrib is required by xhtml, but your script could care less.
Jun 4 '08 #3

gits
Expert Mod 5K+
P: 5,390
even when mixing languages in a page the language attribute is useless ... since you just could use the type attribute too ... there is no need ever to use deprecated attributes unless any browser explicitly cares about ...

kind regards
Jun 4 '08 #4

vikas251074
100+
P: 198
Thanks very much. I got it. And I think this thread will be good for many.

Thanks and regards,
Jun 4 '08 #5

Post your reply

Sign in to post your reply or Sign up for a free account.