Javascript makes the HTML page dynamic , All actions in the page is done by using Javascript.
Usage of Javascript in HTML
We can add JavaScript directly to our HTML file by writing the code inside the <script>
tag.
The <script>
tag can either be placed inside the <head>
or the <body>
tag according to the requirement.
Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
<script>
document.getElementById("demo").innerHTML = "Hello JavaScript!";
</script>
Example
Loading...
JavaScript Can also change the style of elements
Example
Loading...