Agyan
adda
Run
Reset
Copy
JavaScript Tutorial › JS Where To › Script at the end of body
Back to tutorial
Code
Edit, then press Run or Ctrl+Enter
<!DOCTYPE html> <html> <body> <h2>My Page</h2> <p id="demo"></p> <script> document.getElementById('demo').textContent = 'This text was added by JavaScript.'; </script> </body> </html>
Result