Hey all,
I was hoping for some help on a relatively simple question.
When putting a script tag in, I often enter both 'type="text/javascript"' and 'language="javascript"'. Is one preferred to the other? Does one not matter?
I appriciate any help.
Hey all,
I was hoping for some help on a relatively simple question.
When putting a script tag in, I often enter both 'type="text/javascript"' and 'language="javascript"'. Is one preferred to the other? Does one not matter?
I appriciate any help.
Usetype="text/javascript". This is valid, while language is a deprecated attribute.
It does'nt affect your script's performance though, but rather your page's validity.
For further reading:
http://www.w3.org/TR/html4/interact/...ml#edef-SCRIPT
Hope it makes sense.
Learn how to code at 02geek
The more you learn, the more you'll realize there's much more to learn
Ray.ph!
The 'language' attribute is deprecated for 'type', as you would know if you had validated your page.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Here is a list of MIME type that can used with the "type" attribute value of script element.
http://krijnhoetmer.nl/stuff/javascript/mime-types/
Bookmarks