Previous Example-|-Next Example-|-Return to Chapter Listing

Example 14.10:
Using a Template Document to Set the Styles

[This example works with Netscape Navigator 4. It won't work with Netscape Navigator 2 or 3, or Internet Explorer 3.]

This time we've placed the style statement in a separate document (myStyleSheet.htm) and linked to that document. The myStyleSheet.htm document contains a statement that changes all the H1 text to green.

Another Heading 1


We put this in the HEAD to link to myStyleSheet.htm: <LINK REL=STYLESHEET TYPE="text/javascript" HREF="myStyleSheet.htm"> This is what myStyleSheet.htm contains: tags.H1.color = "green"
Previous Example-|-Next Example-|-Return to Chapter Listing