Wednesday, May 13, 2009

How to Display the code as HTML in scroll box in blogger

Now when i am trying to display the code in my blogger post today i was facing some problems in showing the HTML code in the front end. Note that in the blogger posts the HTML code which you write in the back end posts will not be displayed as the same in your front end posts. So in order to over come this you need to follow certain HTML coding standards.

If you try to type the HTML as it is (example <, >), the web browser will interpret that as an instruction to display what follows in a new line and will not display the HTML code as it is. So in order to display the above characters you need to replace them. Check the image below


So in order to show the code in the front end copy and paste the HTML code which you want to show in the front end into a notepad file and click EDIT in the menu bar and select "Replace with" and "Find what:" options to replace the symbols with the appropriate codes. (see screen shot below:)

1 comment:

 
Page copy protected against web site content infringement by Copyscape
Clicky Web Analytics