Tuesday, July 3, 2007

How to display html code in blog post?


Suppose you are writing a article which includes HTML code and that code you want to share with rest of the world. But displaying HTML Code on a webpage is not easy because the browser tends to interpret the HTML tags instead of displaying them.

Now it is obvious that if we change those starting and ending brackets sign with something else, our problem will be solved.



1.
Replace < (i.e. less than sign) with &lt;

2. Replace > (i.e. greater than sign) with &gt;



3. Replace (i.e. quote mark) with &quot;



* Suggestion:

It is tired and stupid to replace that one by one so I suggest you
to use Notepad to replace the numbers of < & > .

1.Open a new "Notepad" (Most important step)

2.copy the code that you want to edit to the Notepad

3.click on the tool bar -----Edit\Replace

4.type the code you want to edit on the text blank-----(e.g <)

5.type new code that you want to replace that code on the below
text blank-----(e.g &lt;)

6.click replace all


Done!!