JavaScript Usage
JavaScript script code in HTML must be located between the tags.
JavaScript script code can be placed in the head and body sections of an HTML page.
tells JavaScript where to start and end.
The lines of code between them contain JavaScript:
<script alert(">
<script alert(">My First JavaScript
"
)
;
script
You do not need to understand the code above. Just understand that the browser interprets and executes the JavaScript located between the script tags.
![]() |
Those old examples may use type="text/javascript" in the script tag. |
|---|
