How to remove hyperlink underline

  • Thread starter Thread starter David Allen
  • Start date Start date
Use CSS to do it.

With CSS you can specify -

a { text-decoration:none; }

and none of your links will be underlined.

That rule would go into either a linked stylesheet or one embedded in the
head of the page -

<style type="text/css">
<!--
a { text-decoration:none; }
-->
</style>
 
But its all or nothing, right?
I can't hyperlink underline some items but not others?

I am designing my outlook signature and I have a few hyperlinks in it.
I didn't want the underline but I do want underlined hyperlinks when
I type them into the body of the email.

--
Dave

Murray said:
Use CSS to do it.

With CSS you can specify -

a { text-decoration:none; }

and none of your links will be underlined.

That rule would go into either a linked stylesheet or one embedded in the
head of the page -

<style type="text/css">
<!--
a { text-decoration:none; }
-->
</style>
 
Use the CSS Murray provided, then for the link you want underlined, select the text and then click
the underline button, etc.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================

David Allen said:
But its all or nothing, right?
I can't hyperlink underline some items but not others?

I am designing my outlook signature and I have a few hyperlinks in it.
I didn't want the underline but I do want underlined hyperlinks when
I type them into the body of the email.
 
But its all or nothing, right?

Not at all. That's where containers and selectors come in.

For example, with this CSS, only the links in the menu div will be styled -

#menu a { styles }
.....

<div id="menu"><a href="whatever.html">whatever</a></div>

whereas any other links on the page will be default.

--
Murray
============

David Allen said:
But its all or nothing, right?
I can't hyperlink underline some items but not others?

I am designing my outlook signature and I have a few hyperlinks in it.
I didn't want the underline but I do want underlined hyperlinks when
I type them into the body of the email.
 
Ok how would I do this
Where My Yahoo Signature was not underlined but the rest of the page
hyperlinks would operate normally
I'm really not that familar with CSS or #menu's

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Yahoo Signature</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR></HEAD>
<BODY>
<style type="text/css">
<!--
a { text-decoration:none; }
-->
</style>
<DIV align=left><FONT face=Arial size=2><a href="http://www.yahoo.com">My
Yahoo Signature</a></FONT></DIV>
<DIV align=left><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>
 
Let's do it with valid HTML, OK?

I have fixed the doctype so that it is valid and complete. I have also
added the required quotes around attribute values.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><TITLE>Yahoo Signature</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR>
<style type="text/css">
<!--
#yahoo a { text-decoration:none; }
-->
</style>
</HEAD>
<BODY>
<DIV align="left" id="yahoo"><FONT face="Arial" size="2"><a
href="http://www.yahoo.com">My
Yahoo Signature</a></FONT></DIV>
<DIV align="left"><FONT face="Arial" size="2"><a href="javascript:;">Check
this link</a>
</FONT>&nbsp;</DIV>
</BODY>
</HTML>

--
Murray
============

David Allen said:
Ok how would I do this
Where My Yahoo Signature was not underlined but the rest of the page
hyperlinks would operate normally
I'm really not that familar with CSS or #menu's

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Yahoo Signature</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR></HEAD>
<BODY>
<style type="text/css">
<!--
a { text-decoration:none; }
-->
</style>
<DIV align=left><FONT face=Arial size=2><a href="http://www.yahoo.com">My
Yahoo Signature</a></FONT></DIV>
<DIV align=left><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>
 
Thankx Murray
Not sure what you mean by "valid and complete" but here is my finished
example


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<HTML><HEAD><TITLE>Signature</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR>
<DIV>&nbsp;</DIV>
<style type="text/css">
<!--
#signature a { text-decoration:none; }
-->
</style>
</HEAD>
<BODY>
<DIV align="left" id="signature">

<SPAN
style="COLOR: black; FONT-FAMILY: 'Verdana'">
<a title="My email address" href="mailto:[email protected]">
<font color="#000000" size="2">first</font></a><font size="2">
<a title="My email address" href="mailto:[email protected]">
<font color="#000000">last</font></a></font></SPAN><FONT size=2><B><SPAN
style="FONT-WEIGHT: bold; FONT-FAMILY: 'Verdana'">&nbsp;|
</SPAN></B><SPAN
style="FONT-FAMILY: 'Verdana'"><font color="#008000">Title</font>
</SPAN><SPAN
style="FONT-WEIGHT: bold; FONT-FAMILY: 'Verdana'"><B>|<font color="#008000">
</font></B>
</SPAN><SPAN
style="FONT-FAMILY: 'Verdana'"><FONT color=green>
<a title="Company web site" href="http://www.domain.com">
<font color="#008000">Company</font></a></FONT><font color="#008000">
</font><FONT color=green>
<a title="Company web site" href="http://www.domain.com">
<font color="#008000">&amp;</font></a>
<a title="Company web site" href="http://www.domain.com">
<font color="#008000">Company</font></a>,
<a title="Company web site" href="http://www.domain.com">
<font color="#008000">inc</font></a>.</FONT><font color="#008000"> </font>
<B><SPAN
style="FONT-WEIGHT: bold">|</SPAN></B> <FONT color=black><SPAN
style="COLOR: black">
<a title="Map of office" href="http://local.live.com/">
<font color="#000000">office</font></a>:&nbsp;800.555.1212</SPAN></FONT>
<B><SPAN
style="FONT-WEIGHT: bold">|</SPAN></B> <FONT color=black><SPAN
style="COLOR: black">mobile:&nbsp;800.555.1212</SPAN></FONT></SPAN></FONT>
</DIV>
</BODY>
</HTML>
 
The code you pasted was invalid HTML. It was invalid because you had not
enclosed tag attributes in quotes. The doctype you used was valid but
incomplete. The intention of doctypes nowadays is to tell the browser how
to render the page - yours (although valid) is not recognized by IE, hence
the page will be rendered in Quirks mode - which is suboptimal. To get IE
to render in Standards mode, you must add the url component to the doctype
(as I showed in my suggested markup, and as you have removed in yours
below).

In addition, yours below is still invalid because you have the <div> tag in
your page's head region -

<DIV>&nbsp;</DIV>

(I'm not sure why)

The code you show below will still style ALL <a> tags on the page, since
they are all contained within the <div id="signature">
 
Well I am no html expert by any means so I am strugliing to understand your
points.
When I remove <DIV>&nbsp;</DIV> then my urls get underlined again. Not sure
why
What is Quirks mode. What does subopimal do

So you are saying to place
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

I removed it because Outlook did not put it there when I created the
signature the first time.
I have no idea what I'm doing :)
 
He is trying to make a template to use in Outlook when sending emails.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
No not really a template but in Outlook click on Tools > options > Mail
Format > signatures > New
Thats how I created my .htm file.
Then I edited it in front page to remove the underlines from the signature.

so I guess Outlook's signature creator is not IE html compliant?
 
Back
Top