Is there transparent color or how do I make text transparent?

Updated: 01/24/2018 by Computer Hope
Transparent font

There is no color code for making text transparent in HTML (hypertext markup language) or CSS (cascading style sheets). However, you can make text appear to be transparent on a web page by setting the text color to the same color as the background color.

For example, if the background color of the body or element is white (#FFFFFF), the text can appear transparent by setting the text color to white. See the code example below for how to make text transparent.

<body style="background-color:#FFFFFF">
 <div style="color:#FFFFFF">
 This text would not be seen by the viewer in the browser window.
 </div>
</body>

Below is an example of text that appears transparent, but really is the same color as the background color. You can see this text using your mouse to highlight the hidden text in the box below.

This text would not be seen by the viewer in the browser window.
Note

This technique only makes the text appear transparent in the browser window using your style sheet. If the viewers don't have style sheets on or have a custom style sheets to override others, then the text may still display. Also, the text can be viewed at any time by viewing the page's source code.

Warning

To hide text from viewers, but want to allow search engines, like Google, to find keywords on your page, it is against Google's TOS (terms of service). This action may cause Google and other search engines to stop indexing your website's pages. There are better ways to promote your web page than using this type of tactic.