Tuesday, May 18, 2010

posting code snippets to blogger

When you try to post any code snippet, which related to web applications, If you directly include them into the post with blockquotes, you could never say whether its going to display as it is. because the browser transforms the html code as per the tags. So, its important to post the code with the correct formats. There is a cool site, which converts code snippets to cope with posting on a blog page.

The interface is like the following.

you have to paste your code into 'Enter Markup' text box, and click process, then the site will return the HTML safe code in the second text box, also you can see the preview of the code.

This is the site name : http://www.simplebits.com/cgi-bin/simplecode.pl

Blogger: Beyond the Basics: Customize and promote your blog with original templates, analytics, advertising, and SEO (From Technologies to Solutions)   Google Blogger For Dummies

Then you can cut and paste the code which returned on the second box to the required place with block quotes. So the code will be displayed correctly. There are also some advanced methods and styles to post the code snippet to the blogger also available, but for this method, you might not need to do any further change on code.

No comments:

Post a Comment