December 2013
Intermediate to advanced
384 pages
9h 54m
English
<head> <script type="text/javascript"> alert("JavaScript is Enabled!"); </script> </head>
You can add JavaScript to an HTML document using HTML <script> tags. When the browser encounters a <script> tag, it parses the contents and then executes the JavaScript inside. Typically, the <script> tags are added to the <head> element, but you can also add them to the <body> element.
The web browsers currently default all scripts to javascript; however, it is a good idea to still set the type to "text/javascript" for future compatibility if that changes.
Read now
Unlock full access