...

View Full Version : Comments appearing in webpage



dotancohen
06-08-2006, 03: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
http://what-is-what.com

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

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

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

Kravvitz
06-09-2006, 04: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?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum