Friday, December 03, 2010

Getting HTML code to show up in Blogger

If you want to write something in a blog that happens to be HTML code, you can get it to show up by using alternatives to characters.

In the last post, I was trying to write /<microSD>/ as part of an explanation.  What I posted was just //.  It's because Blogger and the browser interpreted the < > as html code and didn't show it as text.

Why's it showing up here?  Because I didn't actually insert a <.   What I put in is "& l t ; " and "& g t" (without the spaces and quotation marks).  Blogger replaces that set of characters with < and  >.

The alternates are Unicode Alternatives for special characters in HTML.  That link has a long list of them and explains where and how they work.

No comments: