Computer Science, asked by TbiaSamishta, 1 year ago

How does an HTML page identify the JavaScript code ? Give an example.

Answers

Answered by Secondman
5

"HTML page can identify the JavaScript code using the tag <script>. It also has an end tag <script>. Any number of javascripts can be stored in the HTML tag. Importantly Javascript can be identified by using the keywords.

The script can be either placed under the <head> or the <body> tag.  An example of the Javascript is as follows

<html>

<head>

<title> Javascript example </title>

</head>

<body>

<script>

document.getElementByID(“Example”).innerHTML = “Example of Javascript”;

</script>

</body>

</html>

"

Similar questions