Answered Questions

  • JavaScript in HTML

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

    Mahendar

    • Dec 30th, 2011

    We use < script > tag to indicate javascript in html. Place this inside < head > tag. Example:

    Code
    1.  
    2. <script type="text/javascript">
    3.  
    4. function xyz()
    5. {
    6. /// your code
    7. }
    8. </script>

    Nisa

    • Oct 10th, 2011

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

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