0

I'm a software developer and I've started my first blog on Information Technology. Since I'm using wordpress (hosted free plan) as blogging platform, I'm wondering if there's a fast and useful way for styling code snippet in my posts.

2
  • 2
    Not a clue what this has to do with writing. We're not a styling or coding SE.
    – Ralph Gallagher
    Commented May 1, 2011 at 2:49
  • Dear friend, before posting here I've read the policies (faq) about what kind of questions are accepted here. If you didn't, please take a look at it. If I'm not wrong, technical questions and professional blogging topics should be fine with the policies.
    – Francesco R.
    Commented May 1, 2011 at 9:14

4 Answers 4

1

Wrap the code in the <code> or <pre> tags, depending on whether it's an inline snippet or a block of code.

Also, search the web for "wordpress syntax highlighter," which will tell you about several wordpress plugins that can color and style code elements for various programming languages.

Finally, the Wordpress StackExchange site will probably have some great answers for you: https://wordpress.stackexchange.com/

1
  • Thank you so much Dale! Using the <code> tags is right to me, but I should define the colors of each reserved words. I will search the web for some useful plugins that works with some programming languages. Thanks.
    – Francesco R.
    Commented May 1, 2011 at 9:21
1

I prefer WP-Syntax plugin for styling code snippets it also supports many programming languages such as PHP, Bash scripting, etc. There are also many other WP-Syntax Plugins to help with styling, visiaul editor support, etc.

WP-Syntax (Basic Plugin) WP-Syntax Colorizer (Styling Plugin)

0

I use Wordpress, and I use SyntaxHighlighter Evolved for formatting code on my blog. It's very simple to use, and has support for a wide variety of styling languages. It also has support for different colour schemes I believe (although I have not used it myself).

0

If you use free wordpress without ability to install plugin, you can use online free service to convert your code into styled HTML called Quick Highlighter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.