Encode Sample HTML So It Can Be Displayed

Ever try to display sample HTML code on your blog and website and get frustrated with the process?

There are a few ways to do it. The most effective method is to use the php function htmlentities() – but not all blogging platforms make it easy to include php within a page.

This function converts all html entities (such as > and < signs) into their escaped versions – so that they can be safely displayed and not rendered. It would take far too long to escape these all by hand, so it helps to have the php function do the work for you.

If you don’t want to be bothered using php for every bit of sample markup, use the form I’ve built to convert the HTML for you. Enter the HTML into the textarea box and the encoded sample markup will be created for you on the spot. Copy, paste, and publish.

Bookmark and Share:
  • Digg
  • Furl
  • del.icio.us
  • StumbleUpon
  • MisterWong
  • DZone
  • Technorati

2 Comments to “Encode Sample HTML So It Can Be Displayed”

  1. software pr said this on

    Win on Google and be rich if you’re a interessed by that … read this on my own site

  2. linux vps said this on

    What’s Going down i am new to this, I stumbled upon this I’ve found It positively helpful and it has helped me out loads. I hope to contribute & aid other users like its aided me. Good job.

Leave a Reply