How to Hide html code



On occasion, it might be necessary to conceal content or text on a website. For instance, 

you might need to delete a section of text because something has changed, but you might 

also want to keep it in case you need to restore it in the future. It is feasible to conceal

 the material behind a special code as opposed to erasing it totally.


The text is still part of the HTML code on the backend of your website when it is hidden,

 but the ordinary user cannot see it. This is a great resource to utilize when learning HTML or 

while following a lesson. The visibility of text and information can be adjusted quite easy.


How Can HTML Code Be Hidden?

It's rather simple to hide HTML, and the procedure entails "commenting out" the information. You can add comments to your HTML documents to clarify each snippet's purpose for other developers and designers.


You should perform the following actions in your coding tool, whether that is anything like notepad, a developer studio, or simply a web editor:


1) Locate the section or block of text you want to conceal. To modify, click while the active cursor is in front of that block.


2) Before the first character, type this:

This instructs browsers and other software to hide any subsequent content.

<!---


3) In the text you're reading, locate the final character

4) Enter this following the final character:

--->

The browser is instructed to stop concealing the content by this.


5) After saving your document, upload it to the server hosting your website or test it in a browser window. 

Comments