How to show html code in blogger post

Time and again while posting a tutorial involving HTML ,we need to show the actual code for easy reference.But,the code gets rendered i.e it’ll show the output of the code in the browser.I’ve come up with some simple solutions to tackle this problem.


Method 1
Download Windows Live Writer and the problem is solved!
This is a desktop blog-publishing application that is part of the Windows Live range of products. It features WYSIWYG authoring, photo-publishing and map-publishing functionality.
This application was featured in my top 10 best freeware software post.

Method 2

For this method ,you only need a text editor like notepad.

I)Open up notepad.

II)Go to Edit—->Replace (or Ctrl+H) and in the Find what: box write < Replace with: box write .

III)Click Replace All (or Alt+A).

IV)Now go to Edit—>Replace (or Ctrl+H) again and in the Find what: box write > and in the Replace with: box write .

V)Click Replace All (or Alt+A).

VI)Now,copy all the resultant code after above editing.Paste it in your blogger post and view it in the compose mode to make sure everything is fine.

Method 3

This method uses HTML tag textarea.

I)To use this tag just put the code in between .

II)You can specify rows and column in the tag. Just refer to the screenshot given below.

Method 4

This method uses utilities available on the internet.Here,I’ll post two links.You can also find out many of them.
Just Google html encoder .

Link 1:http://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/Encode.aspx

Link 2:http://francois.schnell.free.fr/tools/BloggerPaste/BloggerPaste.html

Another use of the techniques given above ::

While adding JavaScript,HTML codes in blogger template we get this error

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity “url” must end with the ‘;’ delimiter.

This problem can also be solved in the same way given above (except method 3).

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *