title: Is it possible to define a function in <body> tag of <html> and call it form the <script> tag
body: <p>I am new to HTML and Javascript, and I have a strange doubt</p>
  
  <p>Is it possible to define a function in "body" tag of html and call it form the "script" tag</p>
  
  <p>Till now i am trying this...</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script&gt;
     myFunction()
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt; 
  function myFunction()
  {
      alert("Hello World!");
  }
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>