I’ve been struggling ever since getting a blogger account to paste code into the blog as snippets.
The best way isn’t really the most WYSIWYG way of doing it, but here it is.
copy your code and paste it into an online htmlencoder such as
or use a program that can encode for html.
then wrap that code in <code> </code> tags.