Sunday, July 7, 2013

How to show code snippets in Blogger

Information taken from this blog.

This works for now, don't know if it will be optimal. See also this blog; these may be better?

Add this to Template, above </head>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Then you can use <pre> tag for code.
<pre class="brush: cpp">
int x = 2;
</pre>
gives
int x = 2;

1 comment:

  1. thank it's work for me :)

    welcome to my blog http://www.th3guide01.com/

    ReplyDelete