How to Hide an HTML Text Code
Deleting text from your website may not be entirely necessary. Especially if you need that text to appear again one day. Instead of getting rid of the text, you can hide it through the use of an HTML tag. The text will remain in the HTML code, but not in a user's browser window.
Things You'll Need
- HTML editor
Launch your HTML editor. Select "File" and "Open" from the program's navigation bar. Choose the file that you wish to hide the text.
Locate the text within the HTML document you want to hide. Place your cursor before the first character of that block of code.
Type "<" followed by "!---" (no quotes and no spaces) before the first character of the text you want to hide. This open comment tag tells Internet browsers to begin hiding everything from this point forward.
Type "---" followed by ">" (no quotes and no spaces) at the end of the block of text you want to hide. This closed comment tag ensures that the HTML code between the open comment tag and this point will be hidden when viewed with an Internet browser.
Save your HTML document. Preview it in a browser window before uploading to your server.