Pencil Shavings

Tuesday, July 19, 2005

How to display source code

1. Replace < with & lt; (remove space after &)

2. Replace > with & gt; (remove space after &)

Therefore to tag this post "code":

<a href=http://technorati.com/tag/code" rel="tag">code</a>

Therefore an invisible technorati tag:

<a href=http://technorati.com/tag/code" rel="tag"></a>

And, the final clincher, to display the code above:

& lt;a href=http://technorati.com/tag/code" rel="tag"& gt;& lt;/a& gt;

(remove all spaces after the &)
(I feel like I'm speaking in a foreign language)

2 comments:

Unknown said...

Ya foreign. But I can understand what you saying. :)

mis_nomer said...

Ah I see. :) Thanks Eric! It makes a lot of sense.