Highlighting Text 
 Example 9 - Above

Overview of Examples


With CSS (Cascading Style Sheets), you can highlight text on a page to look like you ran a yellow highlight marker over it. This is great for Emphasizing Hyperlinks (Example 1), Words, Page Headings, as on this page, or Important Points you want to make.

It must be noted that some of the following Style Sheets and JavaScript's may only work with Internet Explorer and not with Netscape Navigator browsers.

Just add the HTML code below to the <HEAD> section of your HTML page:

What you've done is create a CSS class. To use it to highlight a text sentence, you'd code it like this; to use it to highlight a text sentence, insert the following HTML statement after the <BODY> statement of a web page:

The words "this line of text is highlighted." (Example 2) would have a yellow background color with black text. Of course, you can change those colors to anything you want by changing the colors in the CSS code. If black is the default color of your text you can remove the "color: #000000;" part.

You can also use the <XX class="HL"> statement with other HTML commands, such as with a Heading Tag  - (Example 3); adding the HTML statement below to the <BODY> section of page will highlight page headings.

You can use the style tags shown below in a linked style sheet as well; or as an inline style. To code an inline style you use the style tags within the HTML <BODY> statement, such as:

On your web page, the above code would look like this:

I have a highlighted background  - Example 4:


Here is another way to change the color of a section of text using a MouseOver .

Here is an example:

This is an example of changing the color of text using a MouseOver.

Here is the HTML code that is required; add the following code to the <BODY> section of your web page - Example 5:


This is great for Emphasizing Hyperlinks - (Example 1).

Just add this code to the <HEAD> section of your HTML page:


Here is another <STYLE> set of code that will produce a Red Underlined Highlight whenever a MouseOver rolls over a Hyperlink; the below <STYLE> code is inserted within the <HEAD> statement - Example 6:

The hover color and the font style can be changed to any color or font.


This Script will not only highlight the Hyperlink, but a RED ARROW points to the linked page -
Example 7:

AltaVista
Don's Home Page
Search Engines Page
Creating Web Pages

Here is the JavaScript Code - add this code to the <HEAD> section of your HTML page; the on.gif and off.gif are the RED - On and Off images:

Below is the code that is placed within the <BODY> statement of the HTML page:


This is a new form of JavaScript that may be placed into a web page.

Below is the JavaScript code that is placed within the <BODY> statement of a web page - Example 8: