Displaying html code or script code in Blog Post

Displaying javacode or Html code in Blogger is really a Big challange For New Bloggger Beta But after reading this post all you problem about posting code in blogger will be solved.If you are New to blogger beta i recommend you to read the basic of blogger , this will help you in playing with Template Html Code in blogger.First you need to put Css code in yours Template , :) B-)

To Insert Css Code In Blogger Log In Blogger >> Layout >>> Template –> Edit HTML Now Insert below Code in <body> , Tag as shown in box below.


/* ---------------------------------------------
Insert html and script on post
----------------------------------------------- */
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;
}


Put this code before
]]></b:skin>


After putting Above code in Template Save the Template, When ever you Insert JavaCode or any other code in Blog Post In Blogger or in Wordpress Use Either <pre>Tag Or<code> Tag, The Code as Shown in below Example :
<pre>Your Post Code Goes Here</pre>
Or
<code>Your Post Code Goes Here</code>

The another way you could use html encoder before you put your code to your post.
Suscribe

Tidak ada komentar:

Posting Komentar