How to Show HTML Code in Your Web Page?

Spread the love

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  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″>
<td>Table Cell</td>

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 code to HTML friendly??

Well the simple and easy solution is postable .

Let us check how to use it??
Step 1. Write your 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.

READ  Difference Between Oracle’s Openscript and HP’s QTP

Spread the love
I am the founder and owner of the blog -, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on


Please enter your comment!
Please enter your name here