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

Example 14.11:
Using a Style ID

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

In this document we created a style ID named bright, then applied that ID to the text below.

Here's a brightly displayed paragraph.

This level 3 header can also be made bright.

Here's a paragraph with some bright text in the middle.


We put this in the HEAD to create the bright ID: <STYLE TYPE="text/javascript"> ids.bright.color = "orange" ids.bright.fontWeight = "bold" </STYLE> We used the ID like this: <P ID="bright"> Here's a brightly displayed paragraph. </P> <H3 ID="bright"> This level 3 header can also be made bright. </H3> <P> Here's a paragraph with <SPAN ID="bright"> some bright text </SPAN> in the middle. </P>
Previous Example-|-Next Example-|-Return to Chapter Listing