View Full Version : Comments appearing in webpage

06-08-2006, 04:52 PM
On this page:
Linux Basics (http://essentialinux.com/basics.php)

You can see the following text at the bottom of the page:

<!-- wget url-to-tar.bz2-file tar -xvvjf tar.bz2-file cd brand-new-folder ./configure --prefix=/usr/local make su #and enter your root pass when asked make install ldconfig #not always needed, but can't hurt exit -->

If you look at the code, that text is enclosed in comments. Why should it appear displayed in the browser? At least, in Firefox on linux it is displayed. Thanks.

Dotan Cohen

06-08-2006, 04:57 PM
The double -- tell the browser to end the comment which is why they are showing.

06-09-2006, 04:33 AM
Thanks, Aero. I thought that anything other than "-->" is legal in a comment. Also, the text is showing even _before_ the --.

06-09-2006, 04:38 AM
The / could be part of the problem as well. A comment in HTML usually is
<!-- -->
<!-- //-->

06-09-2006, 05:58 AM
I doubt the / would be causing a problem.

I thought the // was only to hide the --> from JavaScript processors?

Dotan, did you really have to ask this here, at Sitepoint, and at HTMLforums?