Use CSS to remove Hyperlink underline

How to Use CSS to remove Hyperlink underline

Either if you are using Dreamweaver or a simple notepad to create a HTML webpage, you might have observed an underline  for every basic hyperlink you create on the page. This is the default format of Hyperlinks on a webpage and its quite normal that designers wouldn’t want to have the underline below the simple hyper link.

Method 1: You could use a simple CSS code between the <HEAD> </HEAD> tags of the webpage under consideration and imply embed the below code to make the underline disappear.

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

Method 2: You could also achieve this by using an external style-sheet and simply including this style-sheet within the HEAD tags again as shown below:

STEP 1: Create a file with the name “style.css” and place the below content inside the file

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

STEP 2: Call this file from within the webpage you are designing by including the below code in the <HEAD> </HEAD>

<HEAD>
<LINK REL=stylesheet TYPE=”text/css” HREF=”style.css”>
</HEAD>

Hope this simple tutorial has helped you get rid of the ugly looking underline below any HTML hyperlink.

5 Comments

  1. Josh December 29, 2011
    • Joshu December 29, 2011
  2. sandeep January 4, 2012
  3. Dhruv Bhagat January 20, 2012