Created a New Tool to Encode Sample HTML for Display
I added a new script to the “Tools” section yesterday, which should be of interest to anyone that authors a website about HTML.
I’m sure we’ve all faced this problem at one point or another – how do we get sample HTML to display properly, without being rendered, so that users can view it? Moreover, what’s the best method of doing this?
I first struggled with this when I was writing for another site (Associated Content). Because they filtered out a lot of html tags, it was pretty tough to find a way to get it to display properly. The only method I could get to work reliably was to pad the tags with spaces, like < html >.
Not the best method, but thankfully there are better ways to do it on your own site.
The basic trick is to convert all of your < characters into < and > characters into >. Want to go do all that by hand?
I didn’t think so. I tend to do it by hand if I’m just typing one or two tags, but for a full-fledged example it’s much easier to have a script do the work for you. So I built a tool to do just that.
Head over to the HTML Encoding Form, copy and paste your sample code into one textarea, and press submit. The HTML will be escaped for you, at which point you can copy and paste it back into your tutorial.
Lynna Sterlin said this on October 12th, 2010 at 6:10 pm
29. Thank you for the info you have shared to us. One thing my sister fined this article very significant and it truly helps her in so many methods particularly dealing with her job.
conveyancing said this on November 20th, 2010 at 8:51 am
Truly happy i found it on google.I was talking with my friends a while ago about this topic and I have to say you cleared out a lot of stuffs
Lawanda Grober said this on January 8th, 2011 at 9:03 pm
Haha this guy says he discovered some Runescape hacks… think he’s kidding? Is that doable since Runescape is a server side game?
fontanny czekoladowe said this on March 3rd, 2011 at 12:04 pm
Thank you for this info. Looking forward to another one.
Green Tomatos said this on July 16th, 2011 at 11:47 pm
foundmanywillhave the same conceptwith your blog.
Lindsay Ohare said this on August 7th, 2011 at 6:02 pm
Many thanks for this short article. It’s absolutely helped during my knowledge. I am pretty unique Unwell arrive back to this website. Thank you once again, pal. xDD