You MUST deactivate the HTML code by making it appear as text in whichever box you use. The code I show below WILL work as it's been tested. To have active code to be clickable inside the scroll box, you MUST use a div type scroll box and not one using the "textarea" tags.
Change all the opening tag symbols, "<", to the character entity, & lt ; (without spaces) as & lt ; (without spaces) = <. This will deactivate the HTML code in the textarea/scroll box, but allow users viewing the page to copy/paste the code.
Example:
& lt;img style="width: XXpx; width: YYpx; border: 0; src"pic
link" alt="Text Description" /&' gt;
&' lt; without spaces = < and &' gt; without spaces = >
Example:
<textarea style="background: transparent;" rows="8" cols="70"> & lt;img style="width: XXpx; width: YYpx; border: 0; src"pic link" alt="Text Description"> </textarea>
There is no closing tag for the image tag unless you are using an XHTML DocType then the image tag is closed with a space and a "/":