• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. Combining JavaScript and HTML > Meeting of Worlds—HTML and JavaScrip...

Meeting of Worlds—HTML and JavaScript

So, you know how HTML works, and you now know a little about JavaScript. The next step is to look at how the two come together and work in harmony on a Web page.

Because HTML and JavaScript are entirely separate technologies, rules exist as to how JavaScript can be slotted in to the HTML of a Web page. There are, in fact, several ways to add JavaScript to a Web page, but to get you started we are initially going to concentrate just on the most commonly used and arguably the most flexible method. In this method, JavaScript is inserted in a script block into the <head> tag.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint