Welcome

This is "my" mashed&smashed up personal blog where I try to post useful stuff for people that are into sports, people that want technology to for for them and not vice versa, people looking for solutions to mobile phone problems especially Nokia and Android related, people that are interested in SEO in making money online and more...

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
What have you done? The & l t ; is another way of telling the browser to shov a <.

Simple!

14 comments:

  1. what's your problem.

    ReplyDelete
  2. &alt cant make it because & (will become &) how?

    ReplyDelete
  3. here is an example: http://mashed-up-blog.blogspot.com/2009/03/how-to-get-crappy-ugly-looking-blogger.html

    ReplyDelete
  4. okay but what if I need to show code and explain coding in a blog and it needs to show the < or the > and other tags as examples?

    ReplyDelete
  5. anonymous - this will show < and > tags! Just by replacing them with & g t ; the cone will not be executed, but people will still see < and > in your blogpost when they read it.

    ReplyDelete
  6. this is not what im looking for. thanks for the effort..

    ReplyDelete
  7. Hye! thanks alot, i really need it!

    ReplyDelete
  8. @diden try to goolge for the encoder.
    that is much easier..
    try this one,
    centricle.com/tools/html-entities

    ReplyDelete
  9. works fine for me thank you. see here:

    http://www.korte.de/alexander/2009/12/landing-page-in-wordpress.html

    at the bottom of the post.

    ReplyDelete
  10. Nice discovery friend.

    I appreciate you.

    ReplyDelete
  11. thanks for the info...
    it help me..

    ReplyDelete
  12. Thank you so much for the information!
    Needed it much :)


    GBU
    Arti

    ReplyDelete