How do I add syntax highlighting to a WordPress blog hosted on

On, you can’t install plugins, so you have to use WordPress’ built-in widget.

Do it like:

[code language='python']


Note that those tags go inside your visual editor, not the HTML editor.

You can find more information here.


SyntaxHighlighter is a pretty good tool. It uses JavaScript with CSS classes to mark HTML elements that should be highlighted. It also allows code to be copied to the clipboard and printed.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s