What is GeSHi?
GeSHi stands for “Generic Syntax Highlighter”, and it is used to highlight code snippets in different web languages like PHP, HTML, and CSS. It also converts tags in those languages so that they will not render like regular tags.
For example, if you want to share some HTML code, you have to use something like GeSHi, or the browser will treat your HTML code like regular HTML code.
The following code is done without GeSHi:
Without GeSHi
The following code is done with GeSHi:
<p><strong>With GeSHi</strong></p>
Not that in the code with GeSHi, you can see the HTML tags, and in the code without GeSHi, you cannot see the HTML tags. The words “Without GeSHi” are rendered like regular HTML
How to use GeSHi in Joomla! 1.0
To use GeSHi in Joomla! 1.0, you use the following HTML code:
<pre lang="html">
<!-- your HTML code here -->
</pre>
You can change ‘lang=”html”‘ to other languages like ‘lang=”php”‘ so that GeSHi highlights it according to the language you are using.
How to use GeSHi in Joomla! 1.5
GeSHi has a very slight difference in Joomla! 1.5. Here is an example:
<pre xml:html> <!-- your HTML code here --> </pre>
Note that instead of ‘lang=”html”‘, you use ‘xml:html’. That is the only difference. I’m not sure why they did it that way, but they did so if yo plan on using GeSHi for Joomla! 1.5, you need to be aware of this.

![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=84c338fb-4966-4689-a83e-5abe4d7ccdb0)


June 8th, 2010 at 10:53 pm
what an ultimate tutorial
!!! Thanks a ton for it…
April 1st, 2011 at 12:58 am
I’m using Joomla v1.5 and “TinyMCE 2.0″.
Any time I try to use Geshi tags, it’s clean up by editor.
SELECT * FROM tabela;
SELECT * FROM tabela;
It’s never work.
When a I came back to source HTML view, the PRE tag is only.
Can you help me?
Thanks
April 1st, 2011 at 1:00 am
Sorry! It’s:
<pre xml:lang=”sql”>
SELECT * FROM tabela;
</pre>
<pre xml:lang=sql>
SELECT * FROM tabela;
</pre>
September 24th, 2011 at 3:52 am
I love your blog.. very nice colors & theme. Did you make this website yourself or did you hire someone to do it for you? Plz respond as I’m looking to design my own blog and would like to find out where u got this from. thank you.