Showing HTML or JAVA code like the screenshot below is not as easy as you think. Try posting HTML code inside the posts, you will notice that the HTML code gets hidden.
The Solution:
First Step: Log onto blogger and go to Dashboard –> Layout –> Edit HTML and look for the this code by find option (Ctrl + F)
]]>
Above ]]>, paste the code given below:
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; }
After that click save.
For putting any HTML or JAVA code inside the post you have to first convert the code into escaped characters. To convert the code go to QUICK ESCAPE TOOL, insert the code and click “convert to escaped characters”
Now you have to put that converted code inside the post within “pre” tag as shown below:
And finally click publish post!
0 Comments:
Post a Comment