When you make a new entry in blogger, you get the option to use HTML in your entry and to edit your blog entries.
so type http://blogger.com , then login, then Posting>Edit Posts>Edit
then in there put this at the top:
<script type="text/javascript" language="javascript" src="http://google-code-prettify.googlecode.com/svn/trunk/src/prettify.js"></script>
<script type="text/javascript" language="javascript" src="http://google-code-prettify.googlecode.com/svn/trunk/src/lang-css.js"></script>
<script type="text/javascript">
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}
addLoadEvent(prettyPrint);
</script>
<style type="text/css">
/* Pretty printing styles. Used with prettify.js. */
.str { color: #080; }
.kwd { color: #008; }
.com { color: #800; }
.typ { color: #606; }
.lit { color: #066; }
.pun { color: #660; }
.pln { color: #000; }
.tag { color: #008; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
pre.prettyprint { padding: 2px; border: 1px solid #888; }
@media print {
.str { color: #060; }
.kwd { color: #006; font-weight: bold; }
.com { color: #600; font-style: italic; }
.typ { color: #404; font-weight: bold; }
.lit { color: #044; }
.pun { color: #440; }
.pln { color: #000; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
}
</style>
in this case because blogger does not allow us to link to the stylesheet, we just embed the prettify.css contents.
then add a <code></code>
tag or a <pre></pre>
tag with the class name of "prettyprint"
, you can even specify the language like this "prettyprint lang-html"
so it can look like this
<pre class="prettyprint lang-html">
<!-- your code here-->
</pre>
or like this
<code class="prettyprint lang-html">
<!-- your code here-->
</code>
the code that you put in needs to have its HTML cleaned from < and >
to do this just paste your code in here: http://www.simplebits.com/cgi-bin/simplecode.pl
you can put the top code in your HTML layout so that its included for all pages by default if you like.
and your done :)