Should I use script language attribute or script type?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikas251074
    New Member
    • Dec 2007
    • 198

    Should I use script language attribute or script type?

    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
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    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

    Comment

    • rnd me
      Recognized Expert Contributor
      • Jun 2007
      • 427

      #3
      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.

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5390

        #4
        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

        Comment

        • vikas251074
          New Member
          • Dec 2007
          • 198

          #5
          Thanks very much. I got it. And I think this thread will be good for many.

          Thanks and regards,

          Comment

          Working...