Previous Page
Next Page

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). Let's get to it!

Table 2.1. Just Enough HTMLThe Basics

Tag

Attribute

Meaning

html

 

Contains the HTML part of the Web page

head

 

Contains the header part of the Web page

script

 

Contains the Web page's script or a reference to the external script file. Usually JavaScript, but not always.

 

language

The programming language for the script. This attribute has been deprecated in favor of type.

 

type

The programming language for the script. Required attribute.

 

src

The location of an external script

title

 

Contains the title of the Web page

body

 

Contains the body part of the Web page

 

bgcolor

Sets the background color of the page

h1...h6

 

Contents of this tag are emphasized as heading information; h1 is largest heading size, down to H6 as the smallest heading

 

align

Describes where the contents of this tag should be placed on the page in terms of horizontal or vertical alignment

a

 

Links to another Web page

 

href

Specifies where the user should go when the link is clicked

 

id

The id assigned to the link



Previous Page
Next Page