PDA

View Full Version : html script that stops html activity?



Bebi
09-16-2005, 10:57 AM
there is a html script that kills html so it makes the source code appear instead of the effect of the html... does anybody know it? its a very simple you just type it in and then close it with the "/" when you want

tesco
09-16-2005, 12:12 PM
<!--
before the text you want 'commented' out and
-->
after it.

In CSS you would use /* before and */ after the text

In php you can use a few different ways:
// Before the line of text to be commented (no ending // needed)
# before the line of text to be commented (no ending # needed)
/* before the text and */ after it.

Bebi
09-16-2005, 12:18 PM
doesnt that just hide the html... I mean if you put it infront of the page source code it will display all the html code instead of actually doing what the code is meant to do

Rick Phlegm
09-16-2005, 02:31 PM
You would have to use the HTML codes for symbols like < and > (&lt; and &gt; respectively)

Then the code would appear on the page without actually rendering it. Use a program like Nvu (http://www.nvu.com/) to just cut and paste code into the WYSIWYG window and this substitution will be done for you.

tesco
09-16-2005, 04:54 PM
doesnt that just hide the html... I mean if you put it infront of the page source code it will display all the html code instead of actually doing what the code is meant to do
Sorry guess I didn't understand what you meant.

edit: looks like rick phlegm's idea would work like you want.
Also if you want to keep the spacing/indentation/line breaks that you've put in the code put <pre> tags around the code. :)