EchoEcho.Com
COMPLETE TUTORIALS

HOME TUTORIALS HTML LINKS          

EchoEcho.Com
TOOLS & RESOURCES
 HOME 
 
 TUTORIALS 
 
 RESOURCES 
 
 TOOLS 
 
 DOCUMENTATION 
 
 NEWS 
 
 SITEMAP 

 
  SEARCH THIS SITE

Tell a friend about this site
SUGGEST THIS SITE      

HTML Links


INTRODUCTION

HOW TO MAKE A LINK

COLORS ON TEXTLINKS

LINK TARGETS

NO UNDERLINE

ADVANCED TEXTLINKS

IMAGE LINKS

IMAGE MAPPING

LINK WITHIN A PAGE

LINKS IN FRAMESETS

LINK TO NEW WINDOW

HTML Links :
ADVANCED TEXTLINKS

Instead of just turning off the underline on all links you could be more specific in defining the way you want your links to work.

In the example below underlines are turned off for links.

The A:hoover tells the browser that when the mouse is over a link the underline should appear.
The hoover-option only works on MSIE 4+.
(But it does not cause an error in Netscape if you include it - the effect just does not appear.).

<html>

<head>
<title>This is my page</title>
<style type="text/css">
<!--
A:link {text-decoration: none}
A:visited {text-decoration: none}
A:active {text-decoration: none}
A:hover {text-decoration: underline}
-->
</style>


</head>

<body>
Welcome to my world!<br>
<a href="http://www.yahoo.com>This Link To Yahoo has no underline</a>
</body>

</html>


The methods describe above will turn off the underline-effect for links on the entire page.

If you want to turn off the effect for just a single link, add a styleproperty to the <a href>-tag:

<a href="http://www.yahoo.com" style="text-decoration: none">Go to Yahoo</a>


NOTE:
The methods described only works on MSIE 3, Netscape 4 or newer browsers.


You can make multiple stylesettings instead of just removing the underline. Why not define the colors you want for active or visited links as well?

This example will show you how to:
<html>

<head>
<title>This is my page</title>

<STYLE TYPE="text/css"><!--
A.set1:link {color: #FF00FF; }
A.set1:active {color: #FFFF00; }
A.set1:visited {color: #00FFFF; }

A.set2:link {color: #AA00FF; background: FF00AA; text-decoration: none}
A.set2:active {color: #FF00AA; background: none transparent;}
A.set2:visited {color: #FFFF00; text-decoration: none}
--></STYLE>

</head>

<body>
Welcome to my world!<br>
<a href="http://www.yahoo.com CLASS=set1> Yahoo </a>
<a href="http://www.hotbot.com CLASS=set2> Hotbot </a>
</body>

</html>



Try move the mouse over - or even click (links have been deactivated on this page) - the two links below to see how these effects would work:


Yahoo

Hotbot






<< PREVIOUS
READ MORE >>


IN THIS SECTION


HTML BASICS

TEXT

LISTS

IMAGES

LINKS

BACKGROUNDS

TABLES

FRAMES

FORMS

METATAGS

HEXCOLORS




EchoEcho.Com
COMPLETE TUTORIALS
 HOME 
 
 TUTORIALS 
 
 RESOURCES 
 
 TOOLS 
 
 DOCUMENTATION 
 
 NEWS 
 
 SITEMAP 

EchoEcho.Com
TOOLS & RESOURCES


(c) Copyright 1998-1999 NetKontoret - All Rights Reserved         Last modified on: 09/18/1999 01:36:05