From personal experience, I’ve found SyntaxHighlighter Evolved to be the best:
You put your code inside a shortcode and specify the language:
[sourcecode language="php"]
//Displays the php code
[/sourcecode]
[sourcecode language="html"]
<!-- Displays the html code-->
[/sourcecode]