Wednesday, December 15, 2010

Show HTML code within blogger post

If you wish to share codes on your blog and does not want them to be executed, here is the trick I used on blogger

Follow these simple steps:
  1. Copy the code in notepad
  2. Use 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 replace (or Ctrl+H) again 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 edited code from notepad into the Blogger post
  5. And you are done
What have you done? The & l t ; is another way of telling the browser to show a <.
Sample blog -  http://www.gyandope.co.cc/2010/12/how-to-add-poll-within-blogger-post.html

1 comment:

  1. This site is my inhalation , rattling fantastic design and perfect articles .

    ReplyDelete