i-e Keywords should be highlighted in one color and strings should be highlighted in another color.
Below website is providing an option to generate the formatted HTML code automatically.
This online option/tool will the make blog post easy. Even we need not care about manually replacing special characters such < and > with html entities such as < and >.
Only thing is we need to include their CSS style sheet in our blog.
I came to know about this online formatting tool from a software testing blog.