JavaScript Output
<!DOCTYPE html> <html> <body> <h2>Writing Into an HTML Element</h2> <p id="result"></p> <script> document.getElementById("result").innerHTML = "Hello, world!"; // You can also insert computed values const total = 12 + 8; document.getElementById("result").innerHTML = "The total is " + total; </script> </body> </html>