Question : Comments in HTML Code

Hey there,

is there a possibility to comment parts of the html code out, so that the code won't transfer to the viewing user?

When using <!--comment--> the user will see it when he looks at the sourcecode, but I want to hide temporary some lines, instead of using 2 different files.

I've read something about <%--comment--%>, but it doesn't work.

Answer : Comments in HTML Code

The <%--comment--%> is an asp/asp.net which would not work in html files.
As Dave has mentioned, you'll need to use a server scripting language if you want to do this, html is a client side scripting, so whatever in the file will be seen when you view the source.

check your hosting provider and see if it supports asp or php, if so you can rename the file to either and use their comment.

Check
http://www.tizag.com/phpT/comment.php
http://www.tizag.com/aspTutorial/aspComments.php

Random Solutions  
 
programming4us programming4us