How to Show HTML Code in Your Web Page?

0
30
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

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″>
<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 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.

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here