There is a tutorial on WordPress which explains how to post source code in wordpress posts which is hard to find via Google search.
All you need to do is to surround source code in
[sourcecode] insert source code here [\ sourcecode]
WordPress will automatically recognize this and will parse accordingly.
[sourcecode language=”css” ] insert source code here[\ sourcecode]
Here is how it looks
The following is a simple link
Following is a the source code for above link which is displayed using sourcecode formatting.
<a title="MLB" href="http://www.mlb4all.com" target="_blank">MLB</a>