View Full Version : showing html code - without it turning into real html using a wysiwyg.
vkidv
05-02-2003, 04:09 PM
i know this is probably the most simple question on these forums, but is their any way to show html on a program like namo webeditor (what i use) when i type the html into the program it simply turns into html in the browser, ive tried putting it into a text area...a text box ect.
is there any script or any html tag that makes sure it wont turn into html?
like? <nohtml> or somthing ?
meerkat
05-02-2003, 04:39 PM
vkid…
I know that this may be drawing at straws… but are you saving the file as a '.html' file, ie are you using the correct suffix?
meerkat
oracleguy
05-02-2003, 04:42 PM
I'm a little confused on what your asking, the browser has to have the html to render... If you are trying to see the source, you can try opening one of your saved files in a text editor like notepad or just 'view source' from the browser.
And there isn't "browser html" and "real html". html is html.
vkidv
05-02-2003, 04:55 PM
uhh..i have made it hard to understand.
i use a program..a bit like front page ...and when i type for example:
<b> and </b> like for an 'example' of a script or some html it turns into html..i dont want this i want the <b> </b> as just 'text.'
i hope you understand..
meerkat
05-02-2003, 05:05 PM
I understand now…
this is where the <pre> tag is used.
Have a look at this link.
Here (http://www.scit.wlv.ac.uk/encyc/pre.html)
pjutter
05-02-2003, 05:07 PM
If you're actually trying to display the code itself on a webpage you'd have to use special characters (i.e. write "<b>" as "<b>"). Is that what you mean?
vkidv
05-02-2003, 05:09 PM
yup thats it!
use those wierd symbols??? ohh...darn
pjutter
05-02-2003, 05:13 PM
Yeah kind of annoying. Hope you can do a find and replace or something. -Phyllis
brothercake
05-02-2003, 05:29 PM
You can use literal HTML inside an <xmp> block; but <xmp> is gone from XHTML because it would (or rather, potentially could) be invalid XML.
Catman
05-02-2003, 06:30 PM
Don't tags inside a textarea show up as written?
In other words:
<textarea>
<h1>Here's a Heading!</h1>
</textarea>would display <h1>Here's a Heading!</h1>
With a little careful CSS tweaking on the textarea, you should get what you want with a lot less blood, sweat, and swearing (well, I know I'd be swearing putting in all those < and > entities).
requestcode
05-02-2003, 07:25 PM
Catman,
Yes I do it all the time. The only time you need to be careful is if you are place form tags inside. There is also a product called WEBCPP that will take your html file and create another one to display the code. It uses the <pre> tag to do it. Here is a link to it:
http://webcpp.sourceforge.net/
If you are displaying a lot of code it does save time.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.