Hidden text on websites is many things. It’s a black hat SEO technique from the days when Geocities was new. It’s a way to hide text for scripts to display later. It’s an aid for accessibility. It’s a way to show Google content it can’t otherwise see. It’s risky business, but it can be used safely and effectively, if you know what you’re doing. Follow these ten rules to keep yourself safe using hidden text.
1. Always Consider Intent
The best rule to engrave on your mind, etch in the wall above your web developer’s computer and send in a memo to everyone who has any control over your site at all, is that intent and value are everything. Before taking any action, ask yourself; does this provide value to the user? If so, it’s more likely to be acceptable. If not, you should probably look at doing something else. When it comes to hidden text, it’s all about intent. Are you hiding text for accessibility reasons, or are you hiding it so you can show something to the search engine but not to your readers? It should be clear which of those options is the valid path to take, and which is the one that will earn you a search penalty.
2. Never Match Font Color with Background Color
Setting the color of your font to the color of your background, or near as makes no difference, is the oldest trick in the book. It’s one of the oldest means to game the search engines, and old sites used to cram dozens or hundreds of keywords into their footer with a color set to the same as the background. It’s easily detected and easily penalized these days, and it does nothing to benefit your site. There’s no reason to match font and background color today; any legitimate use of hiding text can be done with scripts, and any perceived benefit you might gain from hiding text has long since been replaced with instant penalties.
3. Never Position Text Off-Screen
Almost as soon as Google discovered and fixed the loophole allowing color-matched text to provide benefit, webmasters went in search of a new way to hide text. They realized that users rarely scroll horizontally, and when they did, it was never very far. This allowed them to use positioning code to hide text off to the side of the page; visible to the search engine, because it doesn’t parse the code, just the text.
Again, however, there’s no possible benefit to hiding text off the side of the screen for the user. None of them will scroll over to see it. It’s not information presented for their benefit. It’s just a trick to make search engines see text that users don’t, to change the ranking of the site in a favorable direction. It doesn’t work, so don’t do it.
4. Never Set Text Size to Zero
How better to hide text than to make it invisibly small? A size of 0 or 1 makes the font so tiny it’s impossible to read without zooming in the browser or copy and pasting the text into a new window.
Can you think of a legitimate reason to have text so small as to be unreadable on your web page? Neither can Google, so it penalizes sites that use text smaller than size 8 or 10.
If you needed further reason, sometimes size 0 simply doesn’t work in browsers, making the text appear full size anyway. It ends up not hidden and providing you no benefit.
5. Never Format Links the Same as Text
Sometimes it’s not the text itself, but links that you want to hide. Google doesn’t much like this either, but it won’t earn you a direct penalty. One way to hide links, if you really must, is to format them via CSS to appear the same as text. That is, get rid of the blue color and the underline, set it to read in your general site font, color and size. The only way a user would be able to tell the link is a link would be with the cursor changing into a hand when hovering over the text, or by hitting tab until the text is highlighted.
The process of hunting for such hidden links, by the way, is called minesweeping. Studies have shown that adults don’t like to or try to minesweep for links; they just ignore anything they can’t see. Hidden links may work for an ARG or children’s game, but for any business use, they are worthless.
6. Avoid Hiding Links in Single Characters
All of the above reasoning about links formatted to look like text applies to links that are put on a single character – a hyphen or period, for example – as well. Google doesn’t like these kinds of hidden links and they provide no value to the user. You can use them for games or for interactivity, if you must, but be aware that they could earn you a penalty. To use them with the most possible safety, make sure the links are nofollowed. If you’re trying to sculpt PageRank with followed hidden links, you’re asking for a manual action.
7. Use Hidden Divs to Display Facebook Comments
Hidden divs are not a great way to hide content for a number of reasons, but one legitimate purpose is to create a hidden div filled with the content from your Facebook comments plugin. That is, if you use the Facebook comments plugin on your blog. This is a workaround because the Facebook plugin is sitting in an iframe, which Google won’t parse. In this case, providing comment information to Google is of potential value to users, who see the content as well, just formatted differently. Other comments plugins don’t have this issue, though, so you don’t need to implement hidden divs for everything.
9. Don’t Hide Text Behind Images: Use Alt Tags
One common way to hide keywords and other text from users, but make it visible to search engines, was to position an image over the text. This doesn’t work for a search perspective, but it’s not the only reason you might want to use the technique. Many webmasters use the overlap to create machine-readable descriptions of the images for accessibility. Fortunately, there’s a better way; use image alt tags. Alt tags are designed for exactly that purpose, so they do everything you need for accessibility.
10. Don’t Hide Video Text: Provide a Transcript
Just like with images, trying to hide text behind or around them for accessibility isn’t a great idea. Google doesn’t parse the content of videos, so if you want the video content to be visible, create a transcript and post it in plaintext beneath the video. For added benefit, turn that transcript into a blog post and market the post.