is there an html code that does not display the code on the webpage?
like it hides it?
is there an html code that does not display the code on the webpage?
like it hides it?
There are a few ways to "hide" HTML. The way to use depends on what you're trying to do.
Lets say you have a piece of HTML code that you want to be hidden. For instance:
<p>This paragraph will be hidden from view</p>
If you want the paragraph to still exist on the client side (the website viewer's browser), but simply be invisible you could do this:
<p style="visibility: hidden;">This paragraph will be hidden from view and take up space</p>
Notice if you use this code, the paragraph will still take up the same amount of space - it will just be invisible.
If you don't want the element to be displayed at all (invisible and takes up no space) you can do this:
<p style="display: none;">This paragraph will be hidden from view and take up no space</p>
Another way to do this would be to simply comment out the code. For instance:
<!-- We are commenting out this part of the code. It will not be displayed
<p>This paragraph will be hidden from view</p>
-->
Also, if you're referring to hiding the HTML source code from the website user, you're out of luck. There's always a way to get access to it. For instance, you could use wget or run the URL through an HTML validator. Pathetic attempts to stop source code view (like javascript disable right click) will only piss off legitimate users.
<yourtag style="display:none;"> </yourtag>
There are other ways of doing this also. There are a lot of website out there that will help you with HTML and CSS questions.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks