Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
how to make some code visible?
Old 05-27-2006, 01:36 PM how to make some code visible?
Average Talker

Posts: 19
Trades: 0
Hi
im trying to make a small peice of code visible on my site so visitors can copy and paste the code and display one of my images in message board or email signatures.
I had it in < textarea > box's and i liked that but only to find out that XHTML Strict doesnt allow < a > tags inside textarea tags so i cant validate with that (i need the images linking back to my site)

sooo i tried to use the code tag (dont know if thats a w3c standard or not??? the validator didnt mind it) but the HTML inside the code tag just works like normal html and it displays the image instead of the code.

help
emagine is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-27-2006, 03:25 PM Re: how to make some code visible?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,935
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
<pre>
Your code here.
</pre>

The one thing you'll have to do with this is replace < signs with &lt; and > signs with &gt;.

http://www.searchenginefriendlylayou...footer_23.html

I use it here to present code samples and make them stand out.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)

Last edited by ADAM Web Design; 05-27-2006 at 03:26 PM..
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 05-27-2006, 03:30 PM Re: how to make some code visible?
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
You have to convert special html charactures into html char equivilant. Most modern text editors will do this for you.

To print this on the screen:
Code:
<b>The Image...</b>
<img src="images.example.gif" border="0" width="100" height="100" alt="The Image" />
You need this in your html:
Code:
&lt;b&gt;The Image...&lt;/b&gt;<br />
&lt;img src=&quot;images.example.gif&quot; border=&quot;0&quot; width=&quot;100&quot; height=&quot;100&quot; alt=&quot;The Image&quot; /&gt;
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 05-27-2006, 04:12 PM Re: how to make some code visible?
Average Talker

Posts: 19
Trades: 0
thanks so much!
emagine is offline
Reply With Quote
View Public Profile
 
Old 05-29-2006, 03:30 AM Re: how to make some code visible?
Moldarin's Avatar
Extreme Talker

Latest Blog Post:
Keyword Density and Title Tags
Posts: 201
Trades: 0
I have a text-to-HTML Entities converter you can use.
__________________
I do not share ad revenue.
Moldarin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to how to make some code visible?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22794 seconds with 12 queries