...

View Full Version : Are hyperlinks always underlined?



Richard2003
02-17-2004, 08:10 PM
Hi,

I would like to know if there is a way to avoid the underlining for a text-based hyperlink.
There are circumstances where the underlining is disturbing, ugly and not necessary.

Thanks,
Richard

J&J
02-17-2004, 08:21 PM
Yes, you can have link text without underlines or with other styles instead - like dotted lines, strike out text, overlines, over & under lines, etc. - although depending on the browser/version used to view such a web page, it may not be compatible with the styles applied.

But anyways, to answer your question simply, you can use CSS within your HTML to make links without underlines:

<a href="www.wherever.com" style="text-decoration: none">linked text here</a>


Or if you use CSS, you can make one stylesheet apply to the entire page or the entire site... Which is much easier if you have tons of pages to update/code. :D

brothercake
02-17-2004, 08:45 PM
For accessibility reasons links should always be underlined, unless they come in an obvious context like a navigation bar.

The point of underlining is so that you're indicating purpose without relying on color - if it's viewed by someone who can't distinguish your link color from regular text, then how else do they know what's a link?

Richard2003
02-18-2004, 08:50 PM
Thank you J&J.
It's more simple than I expected ;)

justletme_fly
02-19-2004, 08:12 AM
this code should work for you to remove the hyper links.

<style type="text/css">
<!--
a:link {text-decoration: none}
a:visited {text-decoration: none}
a:active {text-decoration: none}
a:hover {text-decoration: none}
--></style>

it will get rid of all decorations

mindlessLemming
02-19-2004, 08:19 AM
Originally posted by justletme_fly
this code should work for you to remove the hyper links.


It seems to be a popular trend to have the text underline in the :hover state. Call it a happy medium between old and new.

justletme_fly
02-19-2004, 08:23 AM
i never looked at it that way. i'll keep that in mind for future projects. thanks a lot.

cg9com
02-19-2004, 11:38 AM
Originally posted by justletme_fly
this code should work for you to remove the hyper links.

<style type="text/css">
<!--
a:link {text-decoration: none}
a:visited {text-decoration: none}
a:active {text-decoration: none}
a:hover {text-decoration: none}
--></style>

it will get rid of all decorations

and actually if you're going to do it that way you may as well just use:


a { text-decoration: none; }

me'
02-19-2004, 12:40 PM
Originally posted by mindlessLemming
It seems to be a popular trend to have the text underline in the :hover state. Call it a happy medium between old and new. It actually makes more sense to go the other way. People completely oblivious to colour would recognise the link as a link due to underlining, and when they hover over it, obviously it's still a link.

mindlessLemming
02-19-2004, 01:08 PM
Originally posted by me'
It actually makes more sense to go the other way. People completely oblivious to colour would recognise the link as a link due to underlining, and when they hover over it, obviously it's still a link.
Good point :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum