JavaScript in HTML

Which tag do we use insert a JavaScript in HTML page?

Questions by anilyashsoni

Showing Answers 1 - 6 of 6 Answers


  • Mar 5th, 2011

Please note that there is no such tag to embed javascript in HTML.
JavaScript is entirely client side scripting language and used inside <script> tag.
That does not mean that javascript is just another tag in HTML.. It is totally different language used for client side validation mainly.

  Was this answer useful?  Yes

Wasim Rulez

  • Apr 28th, 2011

we can do it like this

<title>Some title of your choice</title>

this is the proper way of inserting JavaScript into html

  Was this answer useful?  Yes


  • Oct 9th, 2011

Having type property value is javascript so following code will be used for putting javascript in HTML

  1. <script type="text/javascript">

  2. </script>

  Was this answer useful?  Yes


  • Dec 30th, 2011

We use < script > tag to indicate javascript in html.

Place this inside < head > tag.



  2. <script type="text/javascript">


  4. function xyz()

  5. {

  6. /// your code

  7. }

  8. </script>

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions