Does anybody know if it's considered illegal, frowned upon, considered spam etc. to use CSS (cascading style sheets) to alter the display of text on a web page so that the end user does not see it? and if so, to what extent?
I'm worried about using a technique to replace <h1> text with an image of the same text by applying a background image and moving the <h1> text itself way offscreen.
The example is at
bill cooper's site
"About Bill Cooper" is the background image of an <h1> tag but
the text itself is not visible because it is positioned offscreen.
HTML:
HTML Code:
<div id="entryTitle">
<h1>About Bill Cooper MSW, LICSW</h1>
</div>
CSS:
HTML Code:
#entryTitle h1 {position:absolute; left:-1600px;}
#entryTitle {background:url(images/aboutBillCooper.jpg) 0 0 no-repeat;
height:45px; width:300px; padding:0;}
The content in this example is obviously not being misrepresented, but i worry that the absolute positioning offscreen might set off an alarm for an indexing robot.
theoreticaly you could use this technique to hide spamy text.
Other ways I can think of one might use CSS to hide text:
- font-size:0em;
- display:none;
- text color to match background color