PDA

View Full Version : Text links for Google Question?


jb1
29-03-2003, 14:49/02:49PM
How do you take the underline out from the text link? Another we want to have a text link with the keywords but we don't want to have it underlined. I have read somewhere that there is a way to remove the underline for a text link but I can't remember it now. Thank you for your help!




[Not a google question. Moved from Google forum. - Jill]

Blue
29-03-2003, 15:33/03:33PM
You can do this through CSS.

I suggest you learn that language as it's a great tool.

Here's a mini tutorial to help you accomplish your quest:

Place this code in the <head> section of your HTML: <style type="text/css">
<!--
.NoUnderline { text-decoration: none}
-->
</style> You only need the above code once, in the <head> section. The ".NoUnderline" is called a class. In CSS you can define and have as many classes as needed to accomplish your formatting. You can name your classes whatever you wish (I suggest using something descriptive that's not HTML markup).

Then make your link text code look like this: <a href="linktopage.htm" class="NoUnderline">Link to page</a> Use the class="NoUnderline" code for all links you want to be not underlined.

Then, what'll happen is any <a href> link you you give the class NoUnderline to will have .... no underlines.

Some hints:

You can put the CSS code into an external file - this can reduce your HTML filesize, and affords you the opportunity to apply it to more than one HTML file, which in turn makes it easy to change the formatting of your pages from the single CSS file. Beauty!

I would warn against having your links look like the regular non-linked text on your pages. Users are used to having links stand out. I would suggest that if you remove the underlines, you apply some formatting that will make the links stand apart - such as bolding them and making them a different color (all links the same bolded color for usability).

So, to make all your links red, verdana, bold, and not underlined, you would use the following CSS: <style type="text/css">
<!--
.NoUnderline { text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; color: #FF0000}
-->
</style>

Hope this helps and ask away if you need further assistance.

:cheers: