Your Add here

text scrool

8 Dec 2011

How to insert/show HTML and other code in Blogger post


How to insert/show HTML and other code in Blogger post 

Normaly if you copy-paste some code into the edit HTML or Compose window in your Creat post form in Blogger the code will render and show what it is supposed to show. But what if I want to show you the code, not the result of the code. 

How do I insert HTML or PHP or Javascript code into a Blogger post?

I want something like the code in this poste where I wrote about the ugly and simple Blogger templates. The solution is simple.

  1. Copy the code into your NOTEPAD!
  2. Use Edit->Replace (or Ctrl+H) and in find all the < and replace them with & l t ; (delete the spaces between the characters, without spaces you would just see another < here) 
  3. Use Edit->Replace (or Ctrl+H) and in find all the > and replace them with & g t ; (delete the spaces between the characters, without spaces you would just see another > here)
  4. Copy the code from NOTEPAD into the Blogger post
  5. And you are done

0 comments:

Post a Comment