|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
What would be the best way to display HTML code examples. I have seen some people use < and > to replace the '<' and '>'. I am going to be using external files (pages from my site as examples) and don't want them to be pased into HTML.
veggie2u |
|
#2
|
|||
|
|||
|
Hey!
I use $lt; <-- (Substitute $ with &) for the left bracket, and $gt; <-- (Substitute $ with &) for the right bracket. Just use that throught your source code to print it to the screen. Good Luck! yoshi datera@datera.com http://www.datera.com [This message has been edited by yoshi (edited November 10, 2000).] [This message has been edited by yoshi (edited November 10, 2000).] |
|
#3
|
|||
|
|||
|
If you want to display code in this forum then:
Goto http://www.devshed.com/Talk/Forums/ubbcode.html and look at the section under Code Tag. This way you can type all your HTML code without substituting any characters. Example: <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre> <html> <head> ...etc. [/code] [This message has been edited by stardotstar (edited November 13, 2000).] |
|
#4
|
|||
|
|||
|
Using the <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre><xmp>[/code] tag makes your code to plaintext.
To see an example, go to: http://www.****hudt.dk/source.htm You can jump in and out just like you are using all other html-code. I'm not sure it works for browsers less than 4? Steffen |
|
#5
|
|||
|
|||
|
Hey, <xmp>code</xmp> looks promiseing. What is this, an XML command? I havn't been able to find what it is for.
veggie2y |
|
#6
|
|||
|
|||
|
I'm sure <xmp> is just being used as an example.
|
|
#7
|
|||
|
|||
|
xmp is a standard HTML command.
It has been around since the days of Moses, it just hasn't been highly documented. ------------------ John B. Abela Owner, <A HREF="http://www.4cm.com PHP" TARGET=_blank>www.4cm.com PHP</A> Scripts & More! |
|
#8
|
|||
|
|||
|
Ah yes you're right. This is from HomeSite's help files:
<XMP...> NOTE : The <XMP> element was designated as obsolete in recent drafts of the HTML 4.0 specification, which makes it likely that browsers will stop supporting it. While it's supported in Internet Explorer 3.02 (and preview versions of 4.0) and versions of Netscape up to 4.01, it is recommended that for new documents, <PRE> is used instead. |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > How display code examples (HTML tags)? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|