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.







Leave a Reply