O'Reilly logo

Javascript for the World Wide Web: Visual Quickstart Guide, Fifth Edition by Tom Negrino, Dori Smith

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. Start Me Up!

Enough of the warm up; it's time to get scripting. In this chapter, you'll learn where to put your scripts in your HTML; how you can leave comments in your scripts so that you can more easily understand them at a later time; and how you can use scripts to communicate with the user. You'll also see how to make the page automatically change to another page (called redirection), and how you can use JavaScript to detect the kind of browser the user has. Let's get to it!

Table 2.1. Just Enough HTML—The Basics

TAG

ATTRIBUTE

MEANING

html

 

Contains the HTML part of the Web page

head

 

Contains the header part of the Web page

title

 

Contains the title of the Web page

body

 

Contains the body part of the Web page

 

bgcolor

Sets the background color ...

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