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

Chapter 1. Jump-Starting JavaScript > JavaScript Lives in a Web Page

JavaScript Lives in a Web Page

All the code that you write for JavaScript goes into an HTML page. If you don’t know HTML yet, you should run out and get a good book on HTML. Lynda and William Weinman’s Creative HTML Design.2 (New Riders, 2001) is a good choice for designers and developers. However, assuming that you are familiar with HTML, you should be familiar with the whole concept of a tag language. HTML stands for Hypertext Markup Language. As a markup language, HTML essentially describes a web page as a static entity. A far more challenging endeavor is to program a web page that is dynamic, engaging, and intriguing. That’s where JavaScript comes into play.

The most dynamic elements in HTML, beside the link, are event-related attributes. For example, onClick is one of the event-related attributes of HTML. The HTML attribute launches a script when the user clicks on a portion of the page sensitive to a mouse-click action set up by the HTML. However, because HTML itself has no dynamic components, it relies on scripts written in JavaScript. An event-related attribute in HTML is like having a starter on a car with no engine—JavaScript is the engine.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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