Jul 31, 2009

How to display HTML code in a Blogger Post

By on 11:31 PM

Do you want to display some HTML Code in your post as it is. As some of the HTML symbols have some special meaning in HTML so it is very difficult for HTML/XML parser to differentiate between them and the actual programming HTML code.
The result is that HTML code does not appear in your blogger post. Therefore it needs to tell the browser not to parse the HTML code so that it will be displayed correctly. Web design practices also suggests that HTML Code should look different from rest of the content therefore it’s better if displayed in a separate box. The background and color settings of the box can set in the CSS code.
Step 1: Parse/Encode the HTML code using an online parser like and save this code in a notepad file for further use.
Step 2:Copy the code below
background: none repeat scroll 0 0;
border:2px solid Silver;
and Paste this code above the following line of code.
Step 3:Implementing the HTML code
Go to Posting>Create a new Post
Step 4: Click the Edit Html Tab(in Post editor)
<pre class='postCode'>
Paste your Encoded/Parsed HTML code here(created in Step 1)
Step 5:Publish the post and see the post if HTML code is displayed in desired format or not.
Let's take a look at the screen shot as below:

Blogger Template
Recent Articles:
Web 2.0 Skills
What is Web 2.0
How to submit blogger blog sitemap to google
How to add Favicon icon in your blogger blog
10 Tips to increase traffic to your blogger blog
How to add Tags in a post in blogger template
Tips to speed up Your Computer
Blog Title’s Dilemma
How to embed comment form below Post in blogger template

Subodh Raghav

Subodh is a tech savvy guy who is blessed with the art of Blogging,He love to Blog day in and day out,He is a Software Engineer and a Certified Web Enthusiast.


  1. It’s really informative blog.. thanks for sharing

    Get More Details

  2. I have been visiting various blogs for my term papers writing research. I have found your blog to be quite useful. Keep updating your blog with valuable information... Regards