Friday, July 31, 2009

Simple way to post code in HTML without having to search/replace greater and less than signs?

I want to just cut and paste code directly into my blog. I know there's a "Code" tag in html, but it doesn't seem to do anything. Any other slick tricks or do I just need to do a search and replace for the greater and less than signs.





Oh and it would be nice if it would keep my indenting so my code columns lined up.

Simple way to post code in HTML without having to search/replace greater and less than signs?
begining of codes %26lt;XMP%26gt;


end of codes%26lt;/XMP%26gt;





don't ask me what and why because I don't know but I use this codes all the time and just works wonders
Reply:The %26lt;pre%26gt; tag will help with the indenting





As for posting HTML code, if you use PHP you can use htmlspecialchars (or similar functions in other languages)

sim cards

No comments:

Post a Comment