when you see code on a blog like that
http://blog.dembowski.net/2007/08/02/numbered-titles/
Mouseover the code snippet, and look at the icons. mouseover each of those and select either the view source, or copy to clipboard. That'd fix the errors introduced by trying to copy/paste the code from the blog formatting.