Note: This article was originally published in 2009. Some steps, commands, or software versions may have changed. Check the current HTML documentation for the latest information.

I want to have the browser treat a section of the file as text rather than html code. Is there a way to have a browser treat a section as text and display it as is instead of thinking it is html tags and potentially messing up the page? I am mostly interested in this as it would be useful when displaying sample HTML on a post. Thank you. After doing some research, I found two ways to display html tags on a page. One involved replacing the characters ’<’ and ’>’ with < > and ” to &quot. The other alternative I found which I prefer is using the “Code” tag. However, I was not able to use the tag as shown below: <code> <a href="http://JCBauza.com">My site</a> </code> but rather I had to do a combination of both. From the looks of it the tag only allows for special formatting by the browser: <code> <p> &lt;code&gt; </p> <p> &lt;a href="http://JCBauza.com"&gt;My site&lt;/a&gt;</p> <p> &lt;/code&gt;</p> <p> &nbsp;</p> </code>