You are here : htmlHTML 5script

<script> - HTML 5

The <script> tag is used to define a client-side script (JavaScript).

The <script> element either contains scripting statements, or it points to an external script file through the src attribute.

Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.

Tip: If you want to learn JavaScript, visit our JavaScript Tutorial.


Syntax

    <script>document.getElementById("demo").innerHTML = "Hello JavaScript!";	</script>


Example

    <script>document.getElementById("demo").innerHTML = "Hello JavaScript!";	</script>


Output / Return Value


Limitations


Alternatives / See Also


Reference