# JavaScript lanGuage or lanQuage

**URL:** <https://boards.straightdope.com/t/javascript-language-or-lanquage/135307>\
**Category:** Factual Questions\
**Created:** [November 5, 2002, 3:11am UTC](https://boards.straightdope.com/t/javascript-language-or-lanquage/135307 "2002-11-05T03:11:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![enipla](https://avatars.discourse-cdn.com/v4/letter/e/54ee81/32.png) [@enipla](https://boards.straightdope.com/u/enipla)\
**Post date:** [November 5, 2002, 3:11am UTC](https://boards.straightdope.com/t/javascript-language-or-lanquage/135307/1 "2002-11-05T03:11:08Z")

</div>

Good God -

Does Javascript use a Q instead of a G in the word language?

\<script lanquage=“text/javascript”\> instead of \<script language=“text/javascript”\>

This has cost me a week or two.

My code works with a Q. Dosn’t with a G.

wow and dammit.

:smack: :smack: :smack: :smack: :smack: :smack: :smack:

---

<div class="post-metadata">

**Author:** ![Manduck](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/manduck/32/256_2.png) [@Manduck](https://boards.straightdope.com/u/Manduck)\
**Post date:** [November 5, 2002, 3:47am UTC](https://boards.straightdope.com/t/javascript-language-or-lanquage/135307/2 "2002-11-05T03:47:27Z")

</div>

Is “text/javascript” a legitimate value for the language attribute? I always use \<script language=“JavaScript”\> on the few occasions when I do any web page hacking. It will usually work with just \<script\> though, because most (all?) browsers treat Javascript as the default. By misspelling language, you force the browser to ignore that attribute.

---

<div class="post-metadata">

**Author:** ![Manduck](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/manduck/32/256_2.png) [@Manduck](https://boards.straightdope.com/u/Manduck)\
**Post date:** [November 5, 2002, 3:53am UTC](https://boards.straightdope.com/t/javascript-language-or-lanquage/135307/3 "2002-11-05T03:53:54Z")

</div>

Is “text/javascript” a legitimate value for the language attribute? I always use \<script language=“JavaScript”\> on the few occasions when I do any web page hacking. It will usually work with just \<script\> though, because most (all?) browsers treat Javascript as the default. By misspelling language, you force the browser to ignore that attribute.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [November 5, 2002, 5:49am UTC](https://boards.straightdope.com/t/javascript-language-or-lanquage/135307/4 "2002-11-05T05:49:10Z")

</div>

Yeah, \<script lanquage=“text/javascript”\> will do the same thing as \<script\>, which, for now, is the same thing as \<script language=“javascript”\>.

Because of confusion like this, [the language attribute is deprecated](http://www.w3.org/TR/html401/interact/scripts.html#adef-language), ie, don’t use it. What you want is the type attribute:

\<script type=“text/javascript”\>
