+ 3
How can i write an html code to add marks then average using <h1> tag?
6 Respostas
+ 12
Try doing this:
<h1 id="h1" >
            
        </h1>
        <script>
            var 
         a = Number(prompt()),
         b = Number(prompt()),
         c = Number(prompt());
         document.getElementById("h1").innerHTML =
         Number((a+b+c)/3)
        </script>
+ 10
JS is needed for this...
+ 4
Displaying a html code using JS works like this:
<div id="output"></div>
<script>
document.getElementById("output").innerHTML = "<h1>TEXT</h1>";
</script>
+ 1
Thank you
+ 1
Thank you
0
write java script program having five marks compute its total and average and display them in a web page using <h1> tag.



