JavaScript Statements

In HTML, JavaScript statements are "instructions" to be "executed" by the web browser. This statement tells the browser to write "Hello Dolly." inside an HTML element with id="demo":

HTML file: Displayed by browser:
<p>In HTML, JavaScript statements are "commands" to the browser.</p>
<p id="demo"></p>
<script>
    document.getElementById("demo").innerHTML = "Hello Dolly.";
</script>

In HTML, JavaScript statements are "commands" to the browser.


BackTable of ContentsNext