Plain text is boring and it can really mess up the layout of your post. Also It can be very hard to understand some code without some sort of syntax highlighting.
Here are a few methods that I found useful for Blogger: (those can probably be applied to Wordpress and other platforms)
- Method 1: Using Syntax Highlighter from Alex Gorbatchev
- Method 2: Using an Editor to copy the code as HTML language
- Method 3: HTML CSS Rectangle (PowerShell console look a like)
- Method 4: Embedded code using Gist (GitHub)