Header Ads

How to Show HTML Code in Your Web Page?

How to Show HTML Code in Your Web Page?

Well...Most of us, Who write blog or create sites, need to show the HTML code so that people can copy the HTML code and use for their need.

But if we put direct HTML code, the browser will assume this as a HTML command and execute it. Instead of Code , we will get an equivalent  output from the page.
So this post will help you to find out how we can show HTML code instead of HTML execution.

Let us assume we need to create a table that is having 1 column and 1 row.


something like the below shown

Table Cell


Now the corresponding code will be-


<table border="1" bordercolor="#FFCC00" style="background-color:#FFFFCC" width="100%" cellpadding="3" cellspacing="3">
<tr>
<td>Table Cell</td>
</tr>
</table>


This is how a HTML friendly code will look like.









Your Ad Here



So the transformation is not that easy.Is'nt it??
Now question is how to transfer raw HTML code to HTML friendly??

Well the simple and easy solution is postable .

Let us check how to use it??
Step 1. Write your HTML code that needs to be shown in the webpage.
Step-2  Copy code generated in step-1 and Paste the code to postable window.
Step-3  Click on make it friendly button

Step-4  The code will be friendly now in the same box.



Step-5  Copy the changed code to your webpage.

You are done!!!!.


Update on 16th January -2013

Recently I have noticed that Postable is not able to handle "+" sign. Be careful if you are working with Java,Javascript with + sign inside your expression.
Powered by Blogger.