I sometimes have the desire to display HTML code in a post rather than having the browser interpret it.
Lately, I have been using the wonderful WLW plugin Insert Code Snippet to accomplish this.
In my wanderings today, I learned about two alternatives - the HTML tags <pre></pre> (for preformatted text) and <xmp></xmp> which indicates a block of text where all HTML tags are ignored. Of the two, <xmp> more precisely accomplishes what I want, but it is deprecated.
As an example, consider the following:
<> & ± <ahref="http://www.blogdom.org">test</a>
using the <pre> tag, you end up displaying:
<> & ± test
with the <xmp> tag, you get the full desired string of:
<> & ± <ahref="http://www.blogdom.org">test</a>
Interestingly, while entering this entry, I discovered that if I just type the HTML in any view other than the HTML Code view in WLW, what I type is what gets displayed in the blog entry (i.e. WLW translates the special characters into HTML entities rather than writing them to the blog for them to be interpreted by the browser).
Hmm...
Digg It!
Bookmark it!