(page requirements)

Creating links without underlines

Although underlines help us to identify links on web pages, there are some instances where you may want to remove underlines from certain links. It's easy to achieve this effect using "Cascading Style Sheets" (CSS).
 
Removing underlines from selected links
 
If you want to remove underlines from certain links, but not all links on a page, simply add STYLE="text-decoration: none" to the tag starting the link. Example:
 
Before (regular link):
 
 
After (after stylizing the link to remove underlines):
 
<a href="http://www.chami.com/tips/"

STYLE="text-decoration: none"

>
Sample Link
</a>
Listing #2 : HTML code. Download nolinka (0.22 KB).
 
Demo: "Regular Link" | "Same link without underlines"
 
Removing underlines from all links on a page
 
To remove underlines from all links on your page, you can use the following style sheet tags:
 
<style>
<!--
a {text-decoration: none}
-->
</style>
Listing #3 : HTML code. Download nouline (0.18 KB).
 
How above style sheet tags should be placed inside a page:
 
<html>

<head>


  <style>
  <!--
  a {text-decoration: none}
  -->
  </style>


<!-- other tags -->

</head>

<body>

<!-- other tags -->

</body>
</html>
Listing #4 : HTML code. Download nouline2 (0.24 KB).
 
 
Applicable Keywords : Cascading Style Sheets, HTML, Internet Explorer, Explorer 4.x, Internet, Netscape Navigator, Communicator 4.x, World Wide Web
 
 
 
Copyright © 2009 Chami.com. All Rights Reserved. | Advertise | Created in HTML Kit editor