Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
Hi hi folks i am trying to find a HMTL/CSS/Javascript PHP source code viewer something like the PHP tag used here.
I am wanting to show code snippets on my site while i am developing my documentation for Cabbit(Soon to be rereleased faster and with some useful classes like pagination, cacheing, and well lots of stuff).

Hopefully this is something that is floating around though google has not been my friend today, perhaps the search terms i have tried.

Things like "Show code source in html" bring back loads of code editors.
 
I cannot really think about anything but using <pre> tags (or the related <code> tags), off the top of my head.

It won't add colour to your code, but should at least show the code as monospaced text, with indents.

Here's someone combining <pre> tags with jQuery to prevent the <pre> boxes becoming too wide...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.