Writing into an HTML element using Javascript

Javascript / Overview of Javascript

348

Program:

<!DOCTYPE html>
<html>
<body>

<h2>Writing into an HTML element</h2>
<p>My First Paragraph.</p>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML = 10 + 11;
</script>

</body>
</html> 

Output:

21

This Particular section is dedicated to Programs only. If you want learn more about Javascript. Then you can visit below links to get more depth on this subject.