HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 10th, 2000, 07:39 PM
veggie2u veggie2u is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 5 veggie2u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old November 11th, 2000, 12:04 AM
yoshi yoshi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Posts: 108 yoshi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
Send a message via ICQ to yoshi
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).]

Reply With Quote
  #3  
Old November 13th, 2000, 04:32 AM
stardotstar stardotstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 63 stardotstar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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).]

Reply With Quote
  #4  
Old November 20th, 2000, 03:45 PM
oskar oskar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Location: Copenhagen, DK
Posts: 222 oskar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 50 m 40 sec
Reputation Power: 9
Send a message via ICQ to oskar
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



Reply With Quote
  #5  
Old November 20th, 2000, 07:19 PM
veggie2u veggie2u is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2000
Posts: 5 veggie2u User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hey, <xmp>code</xmp> looks promiseing. What is this, an XML command? I havn't been able to find what it is for.

veggie2y

Reply With Quote
  #6  
Old November 21st, 2000, 04:31 AM
stardotstar stardotstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 63 stardotstar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
I'm sure <xmp> is just being used as an example.

Reply With Quote
  #7  
Old November 21st, 2000, 07:48 AM
AbelaJohnB AbelaJohnB is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 1 AbelaJohnB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to AbelaJohnB Send a message via Yahoo to AbelaJohnB
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!

Reply With Quote
  #8  
Old November 21st, 2000, 11:23 AM
stardotstar stardotstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2000
Posts: 63 stardotstar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 9
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.


Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > How display code examples (HTML tags)?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT