How to Hide Links Using CSS

Use Classes and a Cursor Element to Make the Link Disappear

First, before you do this you should be aware that hiding links makes them virtually unusable to the average viewer. Also, if your readers use older browsers, this tip won't hide the links from them. However, if you want to create a scavenger hunt or easter egg on your site, this is an interesting way to hide links.

Create a Class

You can put your styles in-line within the link tag you want to hide, but in order to be able to use it over and over, you should create a class within your style sheet, in the of your document:

Add the Class to Your Link

Change your link to that class:

Finally, Hide the Menu Notification

When you roll your mouse over a link, the menu of many Web browsers shows the URL where the link will take you. This could give away the location of your hidden link. To fix this, you need to use some JavaScript: