How to show HTML/java codes in blogger(blogspot) blog posts

If you’re a blogspot platform blogger and want to show HTML source codes in your blog posts then you must had a hard time how to make it done. Check out Code BlogKori. You can see that I’ve created special boxes for those HTML codes and the code remains intact inside the post. It’s a nice trick for blogger platform if you’re willing to post tutorials and badges for your readers.

For this you have to take two simple steps,

Step 1

You have to add a special code inside your blogger template. Go to your blogger Dashboard > Layout > Edit HTML. Now hit CTRL+D on your keyboard and search this tag,

]]></b:skin>

Now you have to add this code above that code,

pre
{
background:#efefef;
border:1px solid #A6B0BF;
font-size:120%;
line-height:100%;
overflow:auto;
padding:10px;
color:#000000 }
pre:hover {
border:1px solid #efefef;
}
code {
font-size:120%;
text-align:left;
margin:0;padding:0;
color: #000000;}
.clear { clear:both;
overflow:hidden;
}

Now it will look something like this,

After you done it, click the “Preview” button to see if your blog shows or not. If everything’s okay, then click, “Save template

Step 2

Now each time you create a post and you need to add some HTML codes inside your post, you have to convert it into escapable characters. For this go to this tool called Quick escape and insert your code. Click, “Convert to escaped character” the converted code will be different than the original.

Now create a new blog post and add the converted code. You have to enclosed the code with a “pre” tag(marked as blue) For this I’ve added the same code twice. One normally and the other one with the hack.

Publish your post and see the magic! The normal code showed up with the effect but the hacked on remained intact inside the table.

Please leave a comment with your response and any suggestion for this blogger hack. If you run into any trouble, feel free to ask me a question. Please do share/save this page if it helped you.

Promotional Workwear

Related posts on this topic

{ 20 comments… read them below or add one }

1 Shoaib April 12, 2010 at 6:32 pm

This post is nice. But it doesn’t work sometimes. Moreover it is hard for beginner. I have a blog where I describe that how to show HTML code blog post. This is the post http://how2pediabuzz.blogspot.com/2010/04/how-to-show-html-code-on-blog-post.html

Reply

2 yahaya April 28, 2010 at 8:23 pm

thanks ,it’s working

Reply

3 Mg Lashaung May 4, 2010 at 7:57 pm

Thankyou so much .
I want to share these at my blog .

Reply

4 Neha May 18, 2010 at 2:54 pm

Hey..It is CTRL+F for searching any keyword in any document.

Reply

5 Neha May 18, 2010 at 3:01 pm

By the way,Great post working…Thanks

Reply

6 jaganmangat May 25, 2010 at 2:12 pm

thank you very much,it works gr8……keep on adding such a type of posts…
GOOD LUCK……!!
.-= jaganmangat´s last blog ..Mostly searched Google words from A to Z. =-.

Reply

7 marian June 27, 2010 at 2:11 pm

thak you …i didn’t knew that!
.-= marian´s last blog ..Naruto shippuden 166-Confession =-.

Reply

8 http://trickstoall.blogspot.com June 30, 2010 at 5:56 pm

thanks u very much

Reply

9 Vince July 4, 2010 at 9:08 pm

This is what I have been looking for months. It worked on my blogger blog.

Reply

10 Harshit Singhal July 13, 2010 at 6:07 am

Hey thanx for the code man

Reply

Leave a Comment

CommentLuv Enabled

Comments links could be nofollow free.

Previous post:

Next post: