Need help with innerHTML - Don't know how to explain this in the subject

Say I have an html id called “test” with the text “hello this is a test”.

I then want to manipulate that text, so I use this:
document.getElementById(“test”).innerHTML= “hello this is a very great fun test”;

So that works, and it changes fine. But what I am trying to do is add tags within the text. But if I do that, HTML reads the tags and displays whatever the tags are saying to do. What I mean is, what if I wanted to show this as TEXT rather than allow HTML to suck it in and display the image:
“<img src=“http://www.doesntmatter/images/fun.JPG” BORDER=“0”>”

So to gain a clearer understanding of what I am trying to do, imagine a user clicks an image called fun.jpg on your site. Under the image, prior to clicking it, the image reads “hello this is a test”. Now, if the user clicks the fun.jpg image, you want to change that text to “<img src=“http://www.doesntmatter/images/fun.JPG” BORDER=“0”>”

This way the user sees this exact tag displayed below the image. Is there a way to do this via innerHTML or do I have to write it out another way?

Thank you!!