Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript Usage

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(">

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. 

lamp Those old examples may use type="text/javascript" in the script tag.