O'Reilly logo

JavaScript A Beginners Guide 4/E by John Pollock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2
Placing JavaScript in an HTML File
Key Skills & Concepts
    Using the HTML Script Tags
    Creating Your First Script
    Using External JavaScript Files
    Using JavaScript Comments
image
Now that you have been introduced to JavaScript, you’re ready to start coding. Since JavaScript code is run from HTML documents, you need to know how to tell browsers to run your scripts. The most common way to set off a script is to use the HTML <script> and </script> tags in your document. You can place your script tags in either the head or the body section of an HTML document.
This chapter first shows you how to use the script tags to begin and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required