This topic contains 1 reply, has 2 voices, and was last updated by  Shubham Kumar 1 year, 1 month ago.

  • Author
    Posts
  • #2437 Reply

    Shubham Kumar

    When including JavaScript in HTML, what is the correct syntax to add JavaScript in HTML?

    <script language=”JavaScript”> Or <script type=”text/javascript”> ?

  • #2443 Reply

    Shubham Kumar
    Keymaster

    <script language=”JavaScript”> is deprecated as “language” value is an identifier which has no standards.

    type=”text/javascript”
    is the correct syntax.

    This overrides the default scripting language.

Reply To: <script language=”JavaScript”> Vs <script type=”text/javascript”>?
Your information:




shares