title: HTML Code for Calculating Marks
body: <p>So, I created HTML code for calculating marks but It does not run.  </p>
  
  <pre><code>&lt;head&gt; 
    &lt;title&gt;try to count&lt;/title&gt; 
    &lt;script type="text/javascript"&gt; 
    &lt;!-- 
     var totalMarkCounted=0; 
     function calculate(){ 
      var subject1 = window.prompt ("Enter mark for subject 1:"); 
      var subject2 = window.prompt ("Enter mark for subject 2:"); 
      var total2subject = subject1 + subject2; 
      totalMarkCounted = totalMarkCounted+ total2subject; 
      document.write("&lt;br&gt;Total 2 Subject: ",total2subject); 
      document.write("&lt;br&gt;Total Mark Counted : ",totalMarkCounted ); 
     } 
   } 
  // --&gt; 
  &lt;/script&gt; 
  &lt;/head&gt; 
  
  &lt;body onload="calculate()"&gt; 
  &lt;/body&gt; 
  &lt;/html&gt; 
  </code></pre>