Thursday, May 7, 2009

How to Insert Code in Blog Post


Similar Queries :
How to display java codes in blogger post
How to insert html codes in a seperate box in blog post
Why my codes are not visible in my post.

Many of you wonder how to enter the code (javascript or html in blogger post. Rather then explaining it in technical details, let me write it in the simple and easy language.www.ialwayscapital.com
To insert code in your blog post, first you need to edit your template.

Log in to your Blogger Account >> Click on Layout >> Click on Edit Html
Now find (Press ctrl + F to find) ]]></b:skin> and paste the below code above ]]></b:skin>.

pre
{
background:#eeeeee;
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;
}

Just paste the above code and save template. Now whenever you want to insert the code in your blog post either use <pre> tag or <code> tag before the code. The code only works in HTML mode.

Example :
<pre>
Your Post Code Goes Here </pre>
Or
<code>
Your Post Code Goes Here</code>

If you are using Windows Live Writer, and you edited the above mentioned code in your template then its much more easy, While writing the post, Just hit the TAB button on your keyboard in compose mode and you will see a code box.

I personally use Windows Live Writer Plugin to insert code in blog posts. There are several plugins available to do the job like Source Code, Syntax Highligher etc. Find all plugins at Live Gallery.
Related : Change Blogger Post Title to Increase your Search Engine Rankings

2 comments:

Sandeep on June 14, 2009 5:56 AM said...

Good post for new bloggers
www.techieway.blogspot.com

Gye on July 25, 2011 4:21 PM said...

thanks.. its work...

Post a Comment

Followers

 

I always CAPITAL. Copyright 2008 All Rights Reserved. Blogger Template by Bloganol dot com Modified by I Caps